Hi there!

I really appreciate this module; it's exactly what I was looking for! I'm a complete Drupal neophyte, but I am very comfortable in Standards-based (X)HTML and CSS and quite comfortable in PHP.

I'm using this module in conjunction with image and img_assist. What I want to do is have those lovely thumbnails generate in black-and-white.

I tried adding the following PHP to the image module's "image.imagemagick.inc":

/**
 * Convert an image to black and white
 */
function image_imagemagick_monochrome($source, $dest) {
  $filter = ' -monochrome ' ;
  return _image_imagemagick_convert($source, $dest, $filter);  
}

The idea is to be able to add that flag to the overall command, as per the ImageMagick documentation. What I'm not sure of is how to make this happen from image_exact.module...

Thoughts?

Contact me for help

Comments

jfriesen’s picture

It seems that if using the GD module, the command is -greyscale, not -monochrome. The question remains, though: how to call it through Image Exact Sizes when applying to the thumbnail? I'll post some example code from IES later, unless someone can help me earlier.

jfriesen’s picture

I'm finding it quite disturbing that there's no community support on this issue. If someone is familiar with this issue and can lend a hand, I'd be most grateful...

aaron’s picture

Category: support » feature

not sure off hand. without trying, i suspect that in function image_exact_resize, you'll want to call your function just before image_resize($destination, $destination, $final_w, $final_h);

this sounds like it would be a nice (optional) feature. not sure if this would be the right module for it, or if it should be in another module.

joshk’s picture

I'd be open to expanding this module to be a sort of "image processing" dohicky that does a bunch of things to images after they're uploaded. I think setting up some color-shifting options (or even adding a text slug) wouldn't be out of the question.

Either that or we should roll this and the existing re-size functionalty into a new module. That seems better than having a whole slew of image-altering things to confuse people.

jfriesen’s picture

In the meantime, does anyone have a suggestion for sending the appropriate flag to the image processor?