Closed hamsterbacke23 closed 6 months ago
if checking for jpg/jpeg extension, some sites will also have enabled uppercase and mixed case variations of the extension that need to be handled by this.
exif_imagetype() might be a good idea... wont be able to test for the next 3 weeks myself though. http://stackoverflow.com/questions/1141227/check-if-the-image-is-a-jpeg
@hamsterbacke23 I don't think we can rely on that as it's part of an extension. Using that if available and then check the file extension with proper lower- / uppercase conversion sounds good to me. Any objections to that?
Nope should be ok
I had the problem that with ImageMagick it never uses the image compression rate I defined in the config/site.php. Seems to be a problem for this guy as well: http://www.concrete5.org/community/forums/customizing_c5/jpeg-image-file-sizes-too-large-imagemagick-may-be-the-cause./
I've noticed that $image->getCompression() just returns 0 all the time, a problem noted by someone here as well: http://php.net/manual/en/imagick.getcompression.php
So the solution would be, to test for jpegs from the file extension instead, and use the Method "setImageCompressionQuality" instead of "setCompressionQuality" which actually seems to work...
I was checking the image quality via identify -verbose http://urloftheimage.jpg | grep -i quality