I've selected an area, decided to add an alpha channel. When I do that, for some reason the transparency spreads to unselected areas as seen in the pictures. Same happens with bucket fill. If I fill a selection, it spreads in a faded manner throughout the picture. How do I fix this?
Let me guess, you did a color-to-alpha to remove background and this makes the light parts of you subject transparent. This is normal, the aim of C2A is to produce a layer, which, over a layer filled with the removed color, recreates the original layer. But there are several ways to do it: while removing white, a gray could be either an opaque gray or a partially transparent black. V2A's algorithm aims for the maximum transparency and uses the partially transparent black.
- Select the background: typically, Fuzzy select with the usual threshold (~15), unless you subject has parts that blend smoothly in the background in which case you will have to be a bit more "manual".
- `Select>Grow' by two pixels, so that the selection includes the pixels on the edge of the subject
- Apply color-to-alpha
That way, color-to-alpha only apply were it counts (the edge pixels)
It looks like you are sliding the "opacity" control for the layer. This will change the opacity of the whole layer, regardless of selections and any pixel information - it is meant more for making a content semi-visible behind the current layer than any otherthing.
If you want to change the selected areas to transparent, after adding an alpha channel, and creating your selection, just do
edit->cut - this will modify the information on the pixel level, and effectively turn all pixels to transparency.
If you want varying degrees of opacity instead of total transparency, use the
colors->curves tool or
colors->levels and modify the alpha channel in there: againt he changes are on the pixel level, not on the layer level.
After doing color to alpha, do layer > transparency > threshold alpha. It performs an "all or nothing" operation on the transparency. Works for me.