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 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:
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 first to make sure there is no semi-transparency in the foreground. This is done with Layer > Transparency > Threshold Alpha... and adjusting the threshold to
Then we can remove the alpha channel with Layer > Transparency > Remove Alpha Channel to replace all 100% transparent areas with the background color.
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.