[magick-users] swap black for white
Anthony Thyssen
A.Thyssen at griffith.edu.au
Thu Apr 30 21:19:40 PDT 2009
On Thu, 30 Apr 2009 20:23:47 -0600
Bob Meetin <bobm at dottedi.biz> wrote:
| I have a series of .gif images with transparency which when uploaded to
| a shopping cart, the utility converts the transparency to black.
|
| How can I use convert, what syntax, to swap the black for either
| transparency or white? I can set up a PHP script to run through the list.
|
| -Bob
| _______________________________________________
| Magick-users mailing list
| Magick-users at imagemagick.org
| http://studio.imagemagick.org/mailman/listinfo/magick-users
Just use -background white -alpha shape
to make black transparent
and -negate -background black -alpha shape
to make white transparent
This will make grays semi-transparent, and thus ensure the image
remains properly anti-aliased for non GIF image formats.
See http://www.imagemagick.org/Usage/basics/#alpha_shape
for other colors use +level-colors
http://www.imagemagick.org/Usage/color/#level-colors
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
Experience is what you get when you were expecting something else.
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list