Bug 445995

Summary: Ctrl+Thumbnail click selection aka Select Opaque changes behaviour(opacity) of brush/cut
Product: [Applications] krita Reporter: fa7s
Component: Tools/SelectionAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: ghevan, info
Priority: NOR    
Version First Reported In: 5.0.0-beta2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of varying effect of single stroke

Description fa7s 2021-11-23 20:20:19 UTC
Created attachment 143882 [details]
Screenshot of varying effect of single stroke

SUMMARY
When you use select opaque and you have anything that is not fully opaque (ctrl + thumbnail icon) selection behaves unlike any other selection e.g. brush strokes become transparent and you can't cut that selection.  

STEPS TO REPRODUCE
1. Have something not opaque (like gradient)
2. Ctrl+click layer thumbnail (select opaque)
3. Extend selection with some other tool (rectangular, lasso)
4. Brush stroke, or try to cut with ctrl+x

OBSERVED RESULT
Part that was selected with select opaque behaves differently than part that was selected with standard tools.

EXPECTED RESULT
Cutting that selection should be possible, also brush should behave same way in all parts of selection.

SOFTWARE/OS VERSIONS
Windows:  10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 vanyossi 2021-11-23 20:34:21 UTC
Ctrl + Click on thumbnail selects the opaque areas using the alpha channel. If you have semi-transparent areas they will be masked accordingly. To see how the mask is generated change the display mode of the selection from "ants" to "mask" (bottom left icon in the status bar)

https://docs.krita.org/en/user_manual/selections.html?highlight=selection%20display#display-modes
Comment 2 fa7s 2021-11-23 20:53:24 UTC
(In reply to vanyossi from comment #1)
> Ctrl + Click on thumbnail selects the opaque areas using the alpha channel.
> If you have semi-transparent areas they will be masked accordingly.

Hi, sorry for bad report then. Is there a way to select it fully with this feature? Or transform current selection so it behaves like rectangular selection/lasso etc.? What should I do to be able to cut out this fully?
Comment 3 David REVOY 2021-11-23 22:18:08 UTC
Yes, this is not a bug, but the normal behavior; it is useful.

> What should I do to be able to cut out this fully?

A way in this case would be to :
1. After "Select opaque", create a temporary paint layer
2. Fill it with any solid color
3. Deselect
4. call Filter > Adjust > Color adjustement curves , set it to transform the "alpha" channel; and contrast the transparency with the curve so all the pixels non-transparent are now full opaque.
5. Redo "Select opaque" on this temporary paint layer, you'll have the silhouette only with 100% opaque pixels/cut-out shape.
Comment 4 fa7s 2021-11-23 23:16:15 UTC
(In reply to David REVOY from comment #3)
Thanks! Really appreciate help! I've found much simpler way to do this, after select opaque just right click and convert to vector selection. Once again sorry for being overzealous! Next time I'll go to forums with that.
Comment 5 David REVOY 2021-11-24 05:08:23 UTC
Oh, thanks for sharing you tip; that's very interesting to know. 
And no problem about being overzealous. ;-)