Posted by bartclarkson on February 25, 2010 at 5:49pm
2 followers
| Project: | ImageAPI |
| Version: | 6.x-1.10 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
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.
Comments
#1
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'.)
#2
Changing the status to 'needs review'. Please review and let me know how you think!
Mori
#3
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.