Mobile app version of vmapp.org
Login or Join
Karen819

: GIMP: Remove half-transparency from an image and add leave full transparency-part untouched I have the following image of a yellow marker. Everything around the marker is fully transparent. But the

@Karen819

Posted in: #Gimp #Transparency

I have the following image of a yellow marker.
Everything around the marker is fully transparent.
But the yellow and the white part inside the marker is half-transparent.
I do not want any transparency inside the marker, but i want the outside-transparency to stay.
How do i do this in GIMP?

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Karen819

4 Comments

Sorted by latest first Latest Oldest Best

 

@Lee3735518

Another way (by the way, since your white is fully opaque, I won't address it):


Sample the yellow with the color picker
Use the Select by Color tool to select the yellow (this should select both the circle and the "triangle")
Select>Grow by two pixels (the selection should bleed over the white and the black)
Set the bucket-fill tool to Behind mode (selector on top of the Tool options dialog), and to Fill whole selection
Bucket-fill the selection


The behind mode only fills the "transparent" part of pixels (fully opaque pixels are therefore unchanged). In other words, it is equivalent to adding a layer under your current layer and filling it with the color.

10% popularity Vote Up Vote Down


 

@BetL875

These are the steps I took:


Select background with the select by color tool ()


Remove alpha channel (Layers > Transparency > Remove Alpha Channel). This will replace the transparency with the selected background color (usually white)


Add transparency channel again (Layer > Transparency > Color to Alpha choose white).
Delete selected background (Del)

10% popularity Vote Up Vote Down


 

@Dunderdale640

Use the fuzzy select tool to select the background.
Select>Grow by two pixels, so that the selection includes the edge pixels.
Select>Invert
Layer>Mask>Add layer mask and initialize to "Transfer layer's alpha channel"
Bucket-fill with white (this paint should go to the layer mask)
Layer>Mask>Apply layer mask when you are happy with the result

10% popularity Vote Up Vote Down


 

@Moriarity648

GIMP and other raster image editors aren't the ideal software for such graphics. Better to look at vector image editing software such as Inkscape(dot)org which is free and Open Source. Recreating such simple graphics in vectors is easy, plus it will be better quality, and rescalable.

Anyway, you asked about GIMP, so here's one way to do it.


Open the PNG in GIMP
Right click the layer in the layers panel, and duplicate the layer about 4 times (see screenshot below), until you can't see through the yellow
Layer > Merge > Visible
File > Overwrite


If you want to keep the original, make sure you work on a copy!



By way of comparison, here's an example recreated in Inkscape, and exported as plain SVG. You can download the SVG and drag it into your browser to view it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme