For a given shape, I would like to fill it with the line color. However, using the fill bucket, the transparency on the inside of the image is still visible.

enter image description here

Double clicking with the fill bucket will remove the transparency from the inside, but it removes it from the outside of the shape as well. This creates a very pixelated shape.

enter image description here

Is there a way that I can preserve the transparency on the outside of the shape while filling completely on the inside? The example here is very simple with the oval, but the actual image I am working with is significantly more complex. It would take a very long time to fill by hand.

1 Answer 1


The bucket fill tool will be able to fill similar colors with a given threshold. This can be used to fill open objects with the stroke color but it will not be able to discriminate inner or outer thresholds when the stroke had a semi-transparent border for anti-aliasing.

To overcome this we need some interim steps for desired results:

  1. Use the magic wand select tool (Fuzzy Select in Gimp) rather than the bucket fill tool to select the object's inner area. Take care to set the threshold to 0 or very low values to avoid including outer portions of the stroke in the resulting selection. Do not feather the edges.

    enter image description here

  2. Grow the selection (Select > Grow) with half the pixel width of the stroke. This will make our selection to be in the middle of the stroke's width:

    enter image description here

  3. Use the bucket fill tool with setting to Fill whole selection. This will leave the outer parts of the stroke with the desired transparency.

    enter image description here

Note that on very complex objects you may need a considerable amount of RAM, and CPU power to calculate the path for the fuzzy fill area.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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