possible bug -color-matrix IM 6.6.3.2

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug -color-matrix IM 6.6.3.2

Post 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)?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug -color-matrix IM 6.6.3.2

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -color-matrix IM 6.6.3.2

Post 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
Post Reply