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):
After:
Any advice?
Floodfill transparency going over black lines
- 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
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
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