Page 1 of 1

Bug in -recolor matrix operator IM 6.3.5

Posted: 2007-09-01T05:18:20-07:00
by LarsBT
Hello

I have investigated the -recolor operater and found it does not do correct matrix multiplication to the image as expected.
The issue is discussed at length here: viewtopic.php?f=2&t=9140
at the end. viewtopic.php?f=2&t=9140&p=29633&e=29633


It seems the multiplication is done "a row" at a time, carrying the result forward to the next row. Thus if a pixel has the rgb values (8,32,128) the command

Code: Select all

convert in.png -recolor \
       '0, 0, 1,  \
        1, 0, 0,  \
        0, 1, 0'   \
   out.png
Should just rotate the channels (128,8,32). However this is not the case.

First the red channel is dealt with (top row) here the value from the blue channel is copied (128). Then the green channel is treated, but carrying the result from the new red one (128) and finally the blue channel is copied from the new green (128). Final result is (128,128,128).

My version is ImageMagick 6.3.5 08/31/07 Q16 compiled on Ubuntu 7.04

Regards
Lars Termansen

Re: Bug in -recolor matrix operator IM 6.3.5

Posted: 2007-09-01T06:32:52-07:00
by magick
The problem you reported is fixed in ImageMagick 6.3.5-7, the current release. Thanks.