still bug in -colorize in IM 6.4.1-9

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

still bug in -colorize in IM 6.4.1-9

Post by fmw42 »

I am still finding:

(using IM 6.4.1-9 Q16 non-hdri on Mac OSX Tiger)

convert -size 100x100 gradient: -colorize 100,0,0 tmp.png

Produces a cyan gradient rather than the expected red gradient. Colors are being complemented.

convert -size 100x100 gradient: -colorize 100 tmp.png

Produces an all black image.

Sorry, I did not see your latest reply to my earlier email reporting this in IM 6.4.1-8 until after I sent this.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: still bug in -colorize in IM 6.4.1-9

Post by anthony »

Reminder of the mistake in the above test...

The -colorize operator overlays a image of the given -fill color. If you do not have a -fill color it will default to black.

As such you are overlaying 'black' values into the 'red' channel. As a result 'red' channel is filled with 'zeros' leaving the other colors alone. 'white' minus all its 'red' values then becomes 'cyan'

Colorize is NOT broken, just misused.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply