Mobile app version of vmapp.org
Login or Join
Turnbaugh909

: Forget alpha instead of blending it in Gimp It's now second time I need this so I'm posting it as a question: When a layer has alpha channel, some pixels may be transparent. I want to totally

@Turnbaugh909

Posted in: #Gimp #Transparency

It's now second time I need this so I'm posting it as a question:

When a layer has alpha channel, some pixels may be transparent. I want to totally forget about the transparency. That means, render the original color as full color.

You can "remove alpha channel" in GIMP, but it doesn't do what I actually need. Look at this blue cross I made:



Now I've messed up with it using eraser:



If I remove alpha channel to get the original full color, as in the first image, this is what I get:



But no, I just want back the full blue color. And ideally, I'd like to apply this only on selection, like this one:

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Turnbaugh909

5 Comments

Sorted by latest first Latest Oldest Best

 

@BetL875

Just enable Anti erase (Alt) in the Eraser tool options, set opacity to 100%, and use it.

It does what it name says, the opposite of the usual erase operation, removes transparency.

How it works: transparency is stored in another channel, just as three base colors have each their own channel. This fourth channel is named alpha channel, you can see it in the Channels dialog. The Eraser tool works like a usual brush, but instead of adding to all channels (the Normal mode of a brush tool), it alters only the alpha channel. In its usual mode it decreases alpha (adds transparency), and in the inverted (anti erase) mode it increases alpha (removes transparency). How much transparency will be added or removed with each stroke is controlled by the opacity parameter.

10% popularity Vote Up Vote Down


 

@Hamaas979

Finally found the answer to this:

Layer > Transparency > Semi-Flatten (With an appropriate background colour, white worked for me).

10% popularity Vote Up Vote Down


 

@BetL875

While @Takkat 's answer is correct and should work for you, I have a one step method which I prefer:

Use the Curves tool (Colors->Curves), select the Alpha Channel, and simply drag the curve so that it is an horizontal line at the top.
All Alpha information is mapped to "1" (full opacity).

The effect may, of course, be achieved by the levels tool as well, but I am really used to the curves tool.

10% popularity Vote Up Vote Down


 

@Sent7350415

For my answer I need a little preamble.

In GIMP as well in other editors the images can have a specific channel named Alpha channel, so named from a process called alpha compositing, used to create the appearance of partial or full transparency. You can find here a simple diagram which illustrates this concept.

Some image formats (e.g. PNG) are able to store the alpha channel information and some applications (e.g. the browsers) are able to use this information while representing the image.

On the other hand, you can use on an image (whether with alpha channel or not) brushes with opacity (see here), which create the effect of a color with transparency while drawing.

If the layer is without alpha channel, the brush's color merge with the background color (or anyhow with the colors of the pixels).

The eraser removes areas from the layer replacing them with the background color or - if the alpha channel is on - with transparency (see here).

Finally, when you remove the alpha channel, GIMP replaces the transparency with the background color (in your example the background color was black).

--

Coming to your question, if you want transparent images with full colors, you can simply use brushes with a 100% of opacity (and, if the case, a hardness of 100).

10% popularity Vote Up Vote Down


 

@Tiffany317

With the eraser tool we will replace pixel color information with alpha transparency in case there was an alpha channel (or background color if no alpha layer was defined).

Removing this alpha channel will replace all alpha by the background color. This will sometimes lead to unwanted artifacts in semi-transparent areas.

To overcome this we need to first make sure there is no semi-transparency in the foreground. This is done with Layer > Transparency > Threshold Alpha... and adjusting the threshold to 0:



Then we can remove the alpha channel with Layer > Transpartency > Remove Alpha Channel to replace all 100% transparent areas it with the background color.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme