It would be extremely nice if the global quality settings set within ImageAPI could be overridden for a given imagecache profile. The most intuitive UI approach for a content manager would be to attach this override to the profile as an "action."

The overarching need to go to the highest common denominator for quality settings is really punishing with the profiles delivering large images.

CommentFileSizeAuthor
#1 imageapi_imagecache_quality.patch4.52 KBdokumori
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

dokumori’s picture

Version: 6.x-1.6 » 6.x-1.10
Component: ImageAPI GD » Code
FileSize
4.52 KB

I've just created a module that does this - Imagecache Quality

Since ImageAPI does not allow other modules to hook into / alter the process, I wrote a patch that basically adds drupal_alter() to imageapi_gd.module and imageapi_imagemagick.module to allow other modules to alter the quality. Considering ImageAPI should take no notion of ImageCache presets, I tried to make the change as generic (i.e. not ImageCache-specific) as possible. As a result, I also needed to patch ImageCache too.

I'm attaching a patch for ImageAPI here, which was created based on ImageAPI 6.x-1.10. To get a better idea on how the module does the alteration, please have a look at the module.

The way I patched the code may not be the best way, but it gives us a starting point :)

(The patche adds this feature to both GD and ImageMagick, so I'm changing the 'Component' tag of this issue to 'Code'.)

dokumori’s picture

Status: Active » Needs review

Changing the status to 'needs review'. Please review and let me know how you think!

Mori

bartclarkson’s picture

Hi dokumori! Very cool. I will test this out in dev environment. I'm interested in using it with http://re.vu, where user profiles background images can be very large.