It would be useful to have the option to override the global imageapi jpeg quality at the imagecache_convert preset level. This would allow imagecache actions to use individual jpeg quality settings.
Attached are four patches to attempt to accomplish just that. The patches add a ‘JPEG quality’ option in the imagecache_convert form.
Imageapi, imagecache and imagecache_actions all need to be patched in order to work.
I haven’t learned how to create a test for it yet, sorry (newbie here).
Patches are against:
imageapi-6.x-1.x-dev
imagecache_actions-6.x-1.7
imagecache-6.x-2.x-dev
Comments
Comment #1
cybis commentedSince the ImageAPI and ImageCache are affected I opened issues there too:
ImageAPI: #924304: Allow presets to override JPEG quality setting
ImageCache: #924296: Allow presets to override JPEG quality setting
Comment #2
cybis commentedMany thanks to drewish for suggesting a much simpler approach here: #924304: Allow presets to override JPEG quality setting.
With this new approach only imagecache_colorations and imageapi need patching. imageapi_gd and imagecahce can be left alone.
(reposting drewish imageapi patch here for convenience)
To summarize, only the 2 patches below are necessary.
Comment #3
dman commentedI like the logic of this.
The approach is good for me. It makes sense to support it here, and convert is as good as any action to tag it on to.
+1, I'll try to test some time
Comment #4
cybis commentedCleaned the patch up a little and changed the theme_hook implementation.
Comment #5
dman commentedThanks. Folded this in to 2.x-dev
Great idea all 'round I think.
I've not tested how well it works, but the code is nice, so I'm happy to have it there.