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

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
parker
Posts: 1
Joined: 2013-08-14T08:45:29-07:00
Authentication code: 6789

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

Post 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
Post Reply