Gimp fill melt into borders

colorsgimp

I want to fill an area in Gimp but I keep getting pixels on the border. I would like the color to melt together. See below. Left is what I got. Right is what I want.

gimp pixels

Update

In both images there is a black line with a red filling. In left image the pixels between the line and the filling are gray. The filling was white before so the black line is fading into white background resulting in gray pixels. But now I want the black line to flow into the red color as you see in the right image. There we have a black line, then black/red pixels flow into the red filling. No gray pixels in between.

Best Answer

This is correct behavior. Exact "paint-like" fill would replace only the color you click on. GIMP works on raster graphics, so it can't recognize a border and fill - the image is just a bunch of pixels. Those grey pixels have different color than the one you click, so GIMP won't paint them.

Here are few possible approaches to your problem:

  1. Use threshold. When Bucket Fill is active, you can change its threshold in the toolbox. Bigger threshold means bigger tolerance for color difference. However, borders will probably be pixelated with this approach.

  2. Use the Fuzzy Select tool (aka wand). It's similar to bucket, but instead of filling an area it will select it. Then you can Select -> Grow the selection by 1 and Select -> Feather it slightly. Finally fill it completely (Fill whole selection in the toolbox).

  3. Duplicate that layer, set appropriate mask so only the colored area and some border is visible, then use Colors -> Color to alpha to remove the color, set new color as secondary and remove alpha channel from that layer, then merge it with the original one. This won't work for each pair of colors, but black and red should be fine.

  4. Select the color area using the wand, grow selection by 2-3 and use Colors -> Colorize to replace that color.