Best way to set image quality / compression with 5.7 image helper?
I'm currently using the image helper in 5.7 to generate a thumbnail like so:
$ih->getThumbnail($productImage, 444, 444, true);
Does anyone know the best way to set the quality in 5.7? Is there a global setting or one you can use with getThumbnail() ?
Well, after changing the two line that define the level of compression from 80 to 95..100 I don't see any change. After upload new files, no change.
Any one tried find a replacement in PHP for this module? That produce better results?
I had to modify the helper to be able to do what you want. The function create() was modified. I also submitted the modification to the core team that might add it to the core.
Meanwhile, here it is if you want it.
A few things to keep in mind:
1- do not change the quality value in the helper, that's a default value. Instead use the function setJpegCompression($level)
2- to go back to the default value use the function reset()
3- The helper changed between version of C5 5.7. This one works from 5.7.3 and above. Below that I don't know.