Page 1 of 1

possible bug -color-matrix IM 6.6.3.2

Posted: 2010-08-04T16:47:07-07:00
by fmw42
IM 6.6.3.2 Q16 Mac OSX Tiger

See the interactive color matrix processor at http://www.adobe.com/devnet/flash/artic ... ns_04.html.
and my screensnaps below.


If I put negative values in it, I still get a result. But doing the same in IM complains about negative values:


I think negative values should be allowed for all matrix elements except the transparency/alpha column. I believe the negative values in the main 3x3 rgb section allow for complementary colors (C,M,Y) as seen in my example below. In this case it seems to introduce Magenta as the complement of Green.

convert lillies.jpg -color-matrix \
"1 0 0 \
-1 1 0 \
0 0 1" \
lillies_tmp2.png
convert: invalid argument for option `-color-matrix': 1 0 0 -1 1 0 0 0 1 @ error/convert.c/ConvertImageCommand/956.


Defaults:
Image


Positive value (1) in element row 1, column 0
Image


Negative value (-1) in element row 1, column 0
Image


P.S. In the -color-matrix document at http://www.imagemagick.org/script/comma ... lor-matrix, are the commas relevant and needed (for backward compatibility to -recolor)?

Re: possible bug -color-matrix IM 6.6.3.2

Posted: 2010-08-07T18:06:12-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick-6.6.3-4 Beta available by sometime tomorrow. Thanks.

Re: possible bug -color-matrix IM 6.6.3.2

Posted: 2010-08-08T21:46:36-07:00
by fmw42
thanks. this now works in IM 6.6.3.4 Q16 Mac OSX Tiger

convert lillies.jpg -color-matrix \
"1 0 0 \
-1 1 0 \
0 0 1" \
lillies_tmp2.png