As a simple test, try this:
* Grab the wizard image from http://imagemagick.com/image/wizard.jpg
* Setup an identity transformation using the convert command:
Code: Select all
convert -color-matrix "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1" wizard.jpg colored_wizard.jpg
* Now try setting some RGB, offsets:
Code: Select all
convert -color-matrix "1 0 0 0 1 0 1 0 0 0.5 0 0 1 0 -0.75 0 0 0 1 0 0 0 0 0 1" wizard.jpg colored_wizard.jpg
I'm not certain I set up the matrix correctly, so I tried all sorts of other things including:
* Using floating point values (i.e. 0.0 and 1.0 instead of 0 and 1) for all values
* Using the range 0-255
* Using the bottom row instead of the last column
* Performing the tranformation in a Ruby script with the rmagick gem
* Inserting commas into the matrix's number list, as I've seen in the docs and some examples on this forum
No matter what I do, the offset values are ignored.
Then I tried with the 6x6 color matrix, and it works the way I expect. Unfortunately I really need to work in the RGB color space, so I need the 5x5 matrix to work. In case imagemagick was assuming CMYK internally I've tried using -colorspace RGB with the convert command, but nothing helps.
I've tried this with ImageMagick 6.7.2-0 2011-09-16 Q16, and also some earlier 6.6 version, with the same results.
Can anyone help? Am I doing it wrong, or is this feature buggy? If it's a bug, are there any workarounds or will I need to wait for a fix?
Thanks in advance for any help,
Adam