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

cybis’s picture

Since 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

cybis’s picture

StatusFileSize
new1.06 KB
new1.56 KB

Many 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.

dman’s picture

I 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

cybis’s picture

StatusFileSize
new1.74 KB

Cleaned the patch up a little and changed the theme_hook implementation.

dman’s picture

Status: Needs review » Fixed

Thanks. 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.