Issue with fuzz & floodfill

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
Frescard
Posts: 3
Joined: 2011-05-29T16:47:27-07:00
Authentication code: 8675308

Issue with fuzz & floodfill

Post by Frescard »

I'm running V 6.7.0-0 under Windows, andI cannot get the fuzz argument to do anything.
No matter what value I choose, and where in the command line I position it, it seems to not be interpreted at all (and only fill at a tolerance of 0%).

The command I use is convert orgman.png -fill red -fuzz 20% -draw "color 25,25 floodfill" newman.png, and the before and after pictures can be seen below.
(Of course, I'm just using the red fill color for demonstration purposes. IRL it would be something around #303030.)
Image
Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Issue with fuzz & floodfill

Post by fmw42 »

try putting -fuzz before -fill. this works for me on IM 6.7.0.2 Q16 Mac OSX Tiger. however, you will have a hard time as the background black is too close to the black on his pants.

convert orgman.png -fuzz 1.2% -fill red -draw "color 0,0 floodfill" newman1p2.png
Frescard
Posts: 3
Joined: 2011-05-29T16:47:27-07:00
Authentication code: 8675308

Re: Issue with fuzz & floodfill

Post by Frescard »

Yeah, I had tried that sequence too, but it didn't change anything.
I had also tried it with a JPG version of the same image, but no difference.

If I fill the area in IrfanView (with a tolerance of just 1%) it fills it just fine (barely touching the pants).
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Issue with fuzz & floodfill

Post by fmw42 »

In Windows, syntax is a little different is some cases with special characters, so in this case you need to escape the % as %%, if I am not mistaken


convert orgman.png -fuzz 1.2%% -fill red -draw "color 0,0 floodfill" newman1p2.png

see http://www.imagemagick.org/Usage/windows/
Frescard
Posts: 3
Joined: 2011-05-29T16:47:27-07:00
Authentication code: 8675308

Re: Issue with fuzz & floodfill

Post by Frescard »

YES!!!
That was it! Once I added the other percentage sign, we got lift-off: :)

Image
Last edited by Frescard on 2011-05-29T21:47:02-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Issue with fuzz & floodfill

Post by fmw42 »

sorry I did not catch the windows issue sooner. but glad things are working now to your satisfaction.
Post Reply