question: does imagecache work with imagemagick?
I have moved image.imagemagick.inc to includes, set image tool kit right, and have checked that imagemagick iteself functions (it does) - but no, imagecache does not want to oblige.
any ideas?
thanks,
abramo
Comments
Comment #1
wylbur commentedI'd like to add another module to this list, image_enhanced_scaling. The reason to use imagemagick is because of the image_enhanced_scaling, which renders far superior images to the standard GD2 images. People who want good quality images developed these modules to work in tandem, and this could greatly enhanced by the imagecache addition. I would love to see this for 4.7, but will make all efforts to get to 5.x if it is only available there.
Thanks!
Comment #2
abramo commentedthanks wylbur for making the request more specific by referring to module image_enhanced_scaling. my application is actually exactly like yours: imagecache/imagemagick + image_enhanced_scaling.
the sequence of events when using this bundle requires initially that imagecache may co-operate with imagemagick for imagecache procedures, and thereafter image_enhanced_scaling takes over. the developer of image_enhanced_scaling states specifically that this module does not work with GD2, so it is up to imagecache to have this option. is it easy to incorporate this option into imagecache, and, alternatively, can someone provide a patch for this?
Comment #3
abramo commentedComment #4
jurriaanroelofs commentedI'm also very interested in better output-image quality
Comment #5
dodorama commentedAny news on this?
Comment #6
zoo33 commentedImage enhanced scaling relies on some special tricks a module can do when a node is saved (namely
hook_nodeapi()). Therefore it can only work with image nodes. There is no way to make imagecache use image enchanced scaling without making changes to it's code. I haven't looked at that code yet, so I can't tell you what changes would be necessary, but there is a description of how you can hack the Image exact module to make it use Image enhanced scaling, you'll find it in the latter's README (or was it INSTALL?) file. Maybe the hack would be similar in imagecache.Comment #7
abramo commentedmany thanks zoo33 - could you possibly do somehting about this, as for most of us this is really beyond reach :)
Comment #8
Steve Dondley commented+1 for integration of imagecache with enhanced scaling
Comment #9
zoo33 commentedWell, there is no way to do it without modifying imagecache.module. You could try the following, but I haven't tested if it works. There are no guarantees.
First, install, enable and configure Image enhanced scaling (and the Imagemagick image library). Then open imagecache.module and find the following line:
Replace that line with these four lines:
If you're concerned about image quality, you should only use one Scale action in your preset and no other actions. Or, if you need to crop as well, first scale the images to a size that is roughly double the size that you want to end up with and then do the crop at that size. After that, you do a final Scale to the right dimensions. Easy, right? ;)
Comment #10
zoo33 commentedThe reason for that last routine I described is outlined in this other issue.
Comment #11
abramo commented@zoo33 : : many thanks for providing this : : shall test and report back.
with regard to quality degradation due to consecutive save actions, I have followed the discussion at this other issue and have to say that, from experience, I have found degradation resulting from the second or third such consecutive save to be rather marginal to the average viewer. it is the first save that is really destructive, consequent damage is marginal if we are dealing with only two or three further save actions. assuming imagemagick plus image_enhanced_scaling provide a sharper image, the end result should be superior to what we are getting up to now.
I also feel that image sharpening action should take place twice : once applied mildly to the original prior to any scaling in order to enhance it a bit, and then applied also mildly just before the final save, after all other processing has taken place. the degree of each sharpening action must be determined by testing and experience, according to the expected average quality of the originals.
Comment #12
jersu commentedThe suggestion made in #9 seems to be working for me. Thanks for digging into the code.
Comment #13
dopry commentedI'm not going to integrate these.
Comment #14
zoo33 commentedThe good news is, Image enhanced scaling is no longer needed. The Image module now comes with the module ImageMagick Advanced Options which integrates with image_imagemagick.inc to achieve the same things as Image Enhanced Scaling did, only on a lower level, and affecting all image operations in Drupal. This should mean that Imagecache will benefit too.