2014-10-08 45 views
0

我想要將圖像DPI更改爲300,以獲取PHP中的現有圖像。如何在PHP中將圖像的dpi設置爲300英寸

我在數據庫中有這樣的圖像,我通過PHP獲取它。

代碼如下獲取圖像:

$image = imagecreatefromstring (base64_decode($matches[2])); 

imagepng($image, $imageFile); 

我想以上的圖像的設置DPI爲300。

我使用Zend框架的。

我該如何使用PHP進行設置?

請幫幫我。

回答

0

我會用imagemagic做的工作

$oResamp = new Resampler; 
$image = $oResamp->resample($source, $height, $width, 300); 
相關問題