Page 1 of 1

possible bug - -draw floodfill not gravity sensitive

Posted: 2015-09-28T09:47:56-07:00
by fmw42
According to the docs at http://www.imagemagick.org/Usage/draw/#color, -draw should be gravity sensitive. But it always seems to floodfill from the upper left corner (the default gravity) as in the following example. I have tested numerous releases back to 6.7.5.10 and none of them seem to work correctly. In the following I am trying to floodfill from the south east corner, without having to know the coordinates of that corner.

input:
Image

Code: Select all

convert black_diamond.jpg -gravity SouthEast -fuzz 10% -fill black \
-draw "color 0,0 floodfill"  black_diamond_filled.jpg
Image

A workaround would be to either get the proper coordinates ahead of time or rotate the image 180 degrees, floodfill, then rotate back. But the point is to do this with gravity.

Re: possible bug - -draw floodfill not gravity sensitive

Posted: 2015-09-28T11:37:13-07:00
by magick
Quoting from http://www.imagemagick.org/Usage/draw/#color:
These last two fill type operations are currently the only draw operations that are affected by "-gravity".
That is, -draw text and -draw image. Gravity is not supported for any other draw operation.

Re: possible bug - -draw floodfill not gravity sensitive

Posted: 2015-09-28T12:22:22-07:00
by fmw42
Sorry, I overlooked that comment.