Bug 421816 - Setting transparency of a selection in KolourPaint
Summary: Setting transparency of a selection in KolourPaint
Status: REPORTED
Alias: None
Product: kolourpaint
Classification: Applications
Component: general (show other bugs)
Version: 20.04
Platform: Manjaro Linux
: NOR wishlist
Target Milestone: ---
Assignee: kolourpaint-support
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-20 09:46 UTC by secretagent0016
Modified: 2020-05-24 22:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
secretagent0016: Usability+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description secretagent0016 2020-05-20 09:46:40 UTC
Can you make an option to set transparency of a selection?
That way multiple images could be combined (overlaid) into one.
Comment 1 Martin Koller 2020-05-24 10:51:17 UTC
When selecting, there is a "transparent" option in the toolbox which
makes all pixels having the currently selected background color transparent
in the selection.
Does this solve your request ?
Comment 2 secretagent0016 2020-05-24 22:16:43 UTC
If you are talking about the option to set whether the background is transparent or opaque, it doesn't solve my problem, because then only the background color will be transparent, and it will be fully transparent. I was thinking something like changing alpha of all that is selected for all colors (you can see what the alpha channel does by double clicking on the color palette and changing alpha for some color).

For instance, it would be nice to have some slider that when moved fully to the left would make the entire selection completely transparent, and when moved fully to the right would make it completely opaque (if possible, see below).

Now, here is the tricky part. It shouldn't just set alpha the same for everything selected. If I have in my selection some part that has alpha set to 255 (completely opaque), and some other part with alpha set to 128 (half transparent), then it should change alpha proportionally to that value.

Now, that might complicate things to make everything opaque when pushing slider to the right, but at least it shouldn't be too difficult to implement pushing slider to the left (the part that makes selection more transparent).

This option could be added to Selection -> More Effects...
Comment 3 secretagent0016 2020-05-24 22:54:44 UTC
Let me correct my previous comment.

It shouldn't be difficult even for setting selection more opaque. Let's see first how to make selection more transparent. For instance, if we want to reduce alpha by x%. Then:

An = Ao*(100-x)/100

Where Ao is old alpha value, and An is new alpha value.

Now, if we want to make selection more opaque, we can do the same thing with 255-An and 255-Ao, namely:

255-An = (255-Ao)*(100-x)/100, which gives us

An = 255-(255-Ao)*(100-x)/100