Mobile app version of vmapp.org
Login or Join
Cofer715

: Using GIMP, is there a way to fill an image that has transparency? For a given shape, I would like to fill it with the line color. However, using the fill bucket, the transparency on the

@Cofer715

Posted in: #Fill #Gimp #Transparency

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.



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.



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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer715

1 Comments

Sorted by latest first Latest Oldest Best

 

@BetL875

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:


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.


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:


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




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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme