[magick-users] Convert Verify Output File.
Anthony Thyssen
anthony at griffith.edu.au
Thu Jun 12 18:24:50 PDT 2008
Chris Howell on wrote...
| Hi All,
|
| Sorry what I have is a png image which is the result of a montage of all
| kinds of smaller png's. The background in my montage'd image is black. I
| now want to convert that to an rgba representation where all of the
| background is (which is black) so all black pixels to be transparent.
|
| Thanks for your help.
| Chris
|
Then why don't you re-create the montage with a transparent background.
Montage, Background and Transparency Handling
http://imagemagick.org/Usage/montage/#bg
If the montaged images are framed, giving the images a 'leak proof'
border, then you could try 'area filling' rather than color replacement
so as to avoid making black parts of the actual image transparent.
For example if the 0,0 (top left corner) pixel is black use...
convert image.png -matte -fill none \
-draw 'matte 0,0 floodfill' result.png
and any black pixel 'connected' to that corner will be made transparent.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
With some difficulity and a complete lack of experience,
Death was trying to wink. --- Terry Pratchet, "Mort"
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list