IM 6.7.0.5 Q16 Mac OSX tiger
Perhaps I am doing something wrong. But I get wrong results using -floodfill vs -draw "color ... floodfill"
Input:
This works fine using -draw whether gif or png output:
infile="boxes.gif"
coords=`convert $infile -format "%[fx:w/2],%[fx:h/2]" info:`
echo $coords
convert $infile -fuzz 1% -fill white -draw "color $coords floodfill" boxes_flood2.gif
infile="boxes.gif"
coords=`convert $infile -format "%[fx:w/2],%[fx:h/2]" info:`
echo $coords
convert $infile -fuzz 1% -fill white -draw "color $coords floodfill" boxes_flood2.png
But this does not seem to work (using either gif or png). Perhaps I am doing something wrong or misinterpretting http://www.imagemagick.org/script/comma ... #floodfill
infile="boxes.gif"
coords=`convert $infile -format "+%[fx:w/2]+%[fx:h/2]" info:`
echo $coords
convert $infile -fuzz 1% -floodfill $coords white boxes_flood1.gif
infile="boxes.gif"
coords=`convert $infile -format "+%[fx:w/2]+%[fx:h/2]" info:`
echo $coords
convert $infile -fuzz 1% -floodfill $coords white boxes_flood1.png
possible bug -floodfill IM 6.7.0.5 Q16
Re: possible bug -floodfill IM 6.7.0.5 Q16
Try this command:
- convert boxes_flood1.gif -fuzz 1% -fill white -floodfill +50+50 black x:
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug -floodfill IM 6.7.0.5 Q16
I believe you mean:magick wrote:Try this command:
- convert boxes_flood1.gif -fuzz 1% -fill white -floodfill +50+50 black x:
convert boxes.gif -fuzz 1% -fill white -floodfill +50+50 black show:
and that does work. I had a feeling I was doing something wrong.
However, the docs are not clear about this as I assumed that it would find the color at the coordinates and needed to know the new color.
So I will modify the docs to make it more clear.
Thanks.
Fred
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: possible bug -floodfill IM 6.7.0.5 Q16
You can think of -floodfill as like 'opaque' with a specific color, and a start (seed) point. if that seed point is not withing fuzz of the color you are looking for -floodfill does nothing.
The need for the seed color, was my idea as I wanted a way to specify the 'center' of a fuzz.
I am starting to think that it was a bad idea, as it simply seem to cause more problems than it is worth, as everyone assumes the seed pixel color is what would be used as the center of the fuzz match.
I have updated IM Examples, Color Basics, Floodfill Operator (give it a couple of hours)
http://www.imagemagick.org/Usage/color_ ... #floodfill
to point out this connection to 'opaque', and how it actually works.
Fred, prehaps you like to update -floodfill option reference with what I just pointed out.
The need for the seed color, was my idea as I wanted a way to specify the 'center' of a fuzz.
I am starting to think that it was a bad idea, as it simply seem to cause more problems than it is worth, as everyone assumes the seed pixel color is what would be used as the center of the fuzz match.
I have updated IM Examples, Color Basics, Floodfill Operator (give it a couple of hours)
http://www.imagemagick.org/Usage/color_ ... #floodfill
to point out this connection to 'opaque', and how it actually works.
Fred, prehaps you like to update -floodfill option reference with what I just pointed out.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug -floodfill IM 6.7.0.5 Q16
I already did. Will take a day I guess to filter through.Fred, prehaps you like to update -floodfill option reference with what I just pointed out.
Feel free to modify if you want.
Fred