I don't know if this is the most efficient way, but you could try 
separating the image and the alpha channel, modify the image, then 
recombine the alpha channel with the modified image.


convert image \
\( -clone 0 +matte -fuzz 4 % -fill "#FFFFFF" -opaque "#000000" \) \
\( -clone 0 -channel matte -separate +matte \) \
-delete 0 +matte -compose copy_opacity -composite result

see http://www.imagemagick.org/Usage/compose/#copyopacity





>Hi guys,
>
>I've a vector graphic with a single color as an png file. To look smooth the
>graphic has  an anti aliasement.
>I tried something like this
>
>-fuzz 4 % -fill "#FFFFFF" -opaque "#000000", but the thing is, that not
>every pixel of the graphic will be conerted to the new color.
>I need something like this
>
>http://www.lsus.edu/sc/math/rmabry/imagemagick/multireplace
>->>"Replace black with blue #0000ff:"
>
>I've no idea how to get this. It would be really great, if someone can give
>me a hint.
>Thank you,
>
>cheers
>froesi
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to