3

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.

  • Is this related to the width of the black line surrounding the red? – Nicole Hamilton Mar 4 '13 at 6:36
  • @NicoleHamilton No, I don't think so. It is because of the gray pixels around the line. I can increase the increase the filling threshold but that only moves the problem to the next pixel. I would like the gray pixel to have a red and black mixed color instead of current white and black mix. – PiTheNumber Mar 4 '13 at 7:04
  • But there are gray pixels in both images. – Nicole Hamilton Mar 4 '13 at 7:23
  • @NicoleHamilton ok, sorry. Let me try again. See my update. – PiTheNumber Mar 4 '13 at 10:20
7

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.

  • 1
    Greate answer! I got the best result by mixing 2. and 3. here my simplified version: Use the Fuzzy Select tool (aka wand). Then you can Select -> Grow the selection by 2. Then Colors -> Color to alpha to remove the color, set new color as secondary and remove alpha channel from that layer. Version 1. and 2. did not give the wanted result and with 4 it is to hard to find the right color. Thanks a lot! – PiTheNumber Mar 4 '13 at 18:55
3

A super simple way that I used was to select the area using the wand tool, then choose 'grow' by say a pixel. Then I simply used the paint brush tool to colour the area in again- this leaves a much crisper edge, colour-wise.

  • Welcome to SuperUser! Thanks for posting your answer. To note, emoticons and other decorations are generally discouraged in questions and answers. More information on writing questions and answers and on formatting can be found in the Help Center. – hBy2Py Jun 11 '15 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.