Floodfill transparency going over black lines

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gozoliet
Posts: 1
Joined: 2009-10-05T11:49:32-07:00
Authentication code: 8675309

Floodfill transparency going over black lines

Post by gozoliet »

I have some images that I'm trimming/resizing and turning the white background into transparency, and I've run into a problem with one file. I can't figure out why the floodfill goes OVER the black line.

I've tried various combinations of fuzz, draw, etc. In general I'm using:

convert espn_u.eps -flatten -bordercolor white -border 1x1 -matte -fill none -fuzz 20% -draw "matte 1,1 floodfill" -shave 1x1 -trim -strip espn_u.gif

The source file is:
http://www.tvpassport.com/tvmds/grid/im ... espn_u.eps

Before (just convert -flatten espn_u.eps espn_u.gif):
Image

After:
Image

Any advice?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Floodfill transparency going over black lines

Post by fmw42 »

Using your smaller output image, this seems to work reasonably well.

convert espn_u.png -fuzz 20% -fill none -draw 'matte 0,0 floodfill' espn_matte20.png

What version of IM are you using. If old, perhaps upgrade.

Not sure why you need the -flatten, but -flatten usually requires a background color defined before it.

Also -fuzz should come before -fill
Post Reply