Floodfill on pixelated background creates soft edges

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Floodfill on pixelated background creates soft edges

Postby Grobe » Wed Apr 24, 2013 5:18 am

Hi.

I've found the :tool_paintbucket: being very useful to mask things like lines on a map, and that kind of things.
However, when I have a underlaying bitmap with high contrasts (like games from early 90's) and using the :tool_paintbucket: , the resulting object won't be as sharp as the pixels in the image below (ie, the resulting objects node handles does have a little distance from the nodes).
This means that when "Grow/shrink by" = 0,00 px, the pixels that the resulting figure was meant to cover isn't completely covered by the resulting object, just because of the rounded corners.

In practice, this is not a problem as I can increase the "Grow/shrink by" to more than 1 pixel. That way I'll make sure that the object is completely covered. In some rare cases I have this issue that I have to choose if the resulting object should cover too little or too much (ie it covers other pixels that it shouldn't when "Grown/shrink by" > 0,00 px)

Is there some settings that force the resulting object to replicate (sharp) pixel structure more accurate?
Attachment is just an example on this. When zoming in to the flooded object, you should clearly see that the flooded object isn't as sharp as the white pixel area on the background image.

Another observation I did is that using the :tool_paintbucket: on very small group of pixels (like a smiley or a letter) will actually create a path that is nearly (or is) complete replica of the pixel group to fill onto. Look at the letter P on atached file.
Attachments
FilledPixels_Not_sharp.svg
Flood fill on sharp raster image
(53.73 KiB) Downloaded 198 times
:lol:

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Floodfill on pixelated background creates soft edges

Postby druban » Wed Apr 24, 2013 8:58 am

:tool_paintbucket: uses a raster representation of the drawing to fill. It probably pulls from the screen buffer (My guess).Anyway You will find that if you zoom in before filling you will get a very different result than zoomed out. On large areas you might have to fill in sections. I believe that in the past I have had to start at the bottom to avoid 'unbounded region' exceptions.
Your mind is what you think it is.

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Floodfill on pixelated background creates soft edges

Postby Grobe » Thu Apr 25, 2013 1:59 am

Seems you're right on that. When I zoom in to a small part of the bitmap, Inkscape won't fill more than the screen covers.

Anyway, I always feel better when I know more how a tool actually works. I haven't working much with :tool_paintbucket: in the past, so there is probably more things to learn about this tool ;)
:lol:


Return to “Help with using Inkscape”