imageapi provides a 'desaturate' option, that's used by imagecache and causes a bug in imagecache_actions see http://drupal.org/node/291925

This is because imageapi-imagemagick is actually converting to the greyscale colourspace instead of truly desaturating the image. If instead of using:

-colorspace GRAY

we use modulate (which accepts three parameters: brightness, saturation, hue) and leave the brightness alone whilst reducing the saturation to 0 and ignoring hue:

-modulate 100,0

all is ok.

Which is not to say that a true greyscale option isn't desirable, but it's not the same as desaturate. Patch to follow.

CommentFileSizeAuthor
#1 imageapi-issue_291928-desaturate.patch364 bytesadrinux

Comments

adrinux’s picture

Status: Active » Needs work
StatusFileSize
new364 bytes

Ah, I spoke too soon. All is not ok with this patch, it only works for jpg files in my testing, not png. I would guess it's tied up with the default colourspace for a particular image format and is a lot more complicated than I first thought :(

Patch applies to both 6.x and 5.x but obviously needs more work.

adrinux’s picture

More to the point this still doesn't fix the problem with imagecache_actions colorshift. So now I'm just confused and feel like deleting this whole issue :(

adrinux’s picture

Status: Needs work » Closed (fixed)

Closing this because I can't figure out where to take it from here.