Page 1 of 1
Colorize not working properly in ubuntu but works fine in Mac
Posted: 2015-07-03T00:04:52-07:00
by vinothg
I am trying to colorize the below image to blue using the command
Code: Select all
"convert input.png -fill blue3 -colorize 100% output.png"
In Mac, it is working perfectly fine but in ubuntu it is colorizing the whole image to blue.
Mac output ->
Ubuntu output ->
Is there a different command for ubuntu ?
Re: Colorize not working properly in ubuntu but works fine in Mac
Posted: 2015-07-03T00:37:32-07:00
by dlemstra
You are probably using different versions of ImageMagick. You can get version information with 'convert -version'.
Re: Colorize not working properly in ubuntu but works fine in Mac
Posted: 2015-07-03T09:14:46-07:00
by fmw42
The behavior of -colorize has changed over time when there is an alpha channel. Your png images have been converted to jpg by your hosting service, so we cannot tell anything about the alpha channel.
Please identify your IM versions on your two systems. On current IM versions I get your correct behavior only coloring the lines.
Try this on your Ubuntu system:
Code: Select all
convert input.png -alpha off -fill blue -colorize 100% -alpha on output.png
or this if your system is really old
Code: Select all
convert test.png \
\( -clone 0 +matte -fill blue -colorize 100% \) \
\( -clone 0 -channel a -separate +channel \) \
-delete 0 +matte -compose copy_opacity -composite show: