Page 1 of 1

Imagick::resampleImage() doesn't change x-resolution

Posted: 2013-08-14T08:57:36-07:00
by parker
Dear community,

after trying for 2 hrs I think it would be better to come here for help. Here is the description, thank you in advance for any hints.

----------
WHAT I WANT: to resample A 300ppi jpg Image to 72 ppi
WHAT I GET: a resampled jpg image with a resolution of "300 x 72 ppi"

SCREENSHOTS:

original
Image

resampled
Image

My Code:

Code: Select all

           

           $pathRetinaImage ='retinaimage.jpg';           
            $image = new Imagick();             
            $image->readImage($pathRetinaImage); 
            $image->resampleImage( 72, 72, imagick::FILTER_UNDEFINED,0); 
            $image->writeImage($upload_path.$standardFilename);  
 
NOTES:
I also have had tried following codes:

- $image->setResolution()
- $image->setImageResolution()

And with all possible combinations, it didn't change anything.

Thank you very much for any hints.

parker