Wednesday, 14 August 2013

PHP Imagick after rotateImage update last modified

PHP Imagick after rotateImage update last modified

I have a site where users can upload images. Sometimes these images needs
to be rotated.
Using Imagicks rotateImage function is no problem but the image might
already be cached by other users on the site. Can I update the image files
last modified header?
My rotate script:
$imagick = new Imagick();
$imagick->readImage("path-to-image");
$imagick->rotateImage(new ImagickPixel(), 90);
$imagick->writeImage(path-to-image);
print $imagick->getImage();

No comments:

Post a Comment