[magick-users] Replacing a color always returns black for the "new" color
Bill Ten Broeck
billtenbroeck at gmail.com
Wed Aug 20 11:37:01 PDT 2008
I am trying to take an image I have that has only 3 discrete colors, and
change them to a different color. I also need to add transparency. I'm
new to ImageMagick and am following the instructions at
http://www.imagemagick.org/Usage/color/#replace_draw
The original file format I receive is gif, and I'm trying to end up with
a transparent PNG. My first step is to run the following:
convert test.gif -matte -transparent "#000000" test2.png
This works - no problem. However, when I then try to change one of the
colors using the above web page for examples, I end up with the new
color ALWAYS being black.
An example of what I have tried is:
convert test2.png -opaque #0000ff -fill #1e731e test3.png
I know it is finding the color with the opaque definition, because it
always replaces that color area, without fail, with black.
Unfortunately, that's not the color I need it to be replaced with :(
I have tried numerous input file types (created with Photoshop) and
multiple syntax variations, but the results are always the same... the
new color is black.
I know this has to be a basic error on my part, but I have not been able
to turn anything up. Could someone possibly shed some light?
Thanks.
More information about the Magick-users
mailing list