Bug 434288 - Option "Create separate separation from alpha channel" creates black rectangle.
Summary: Option "Create separate separation from alpha channel" creates black rectangle.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.4.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: wolthera
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-11 15:49 UTC by some dude
Modified: 2021-09-15 14:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test file (97.65 KB, application/x-krita)
2021-03-11 16:31 UTC, some dude
Details

Note You need to log in before you can comment on or make changes to this bug.
Description some dude 2021-03-11 15:49:54 UTC
Option "Create separate separation from alpha channel" creates black rectangle.


STEPS TO REPRODUCE
1. create empty transparent layer
2. make some brush strokes
3. use Image>Separate Image with "Current layer" and "Create separate separation from alpha channel" options checked

OBSERVED RESULT
Created layer "Alpha" contains black rectangle


EXPECTED RESULT
Layer should contain alpha channel of source layer


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

ADDITIONAL INFORMATION

Checked Windows versions 4.4.2 & 4.4.3 beta,
Linux  version 4.4.2
Comment 1 Halla Rempt 2021-03-11 15:58:54 UTC
I cannot reproduce that here, I get a layer with the non-transparent pixels in gray and the transparent pixels black, as expected. Could you attach your test image?
Comment 2 some dude 2021-03-11 16:31:10 UTC
Created attachment 136590 [details]
test file
Comment 3 some dude 2021-03-11 16:34:36 UTC
Added the test file. It contains the source layer and the separation result. Alpha layer contains opaque rectangle.
Comment 4 some dude 2021-03-11 16:57:13 UTC
UPD: This happens if "Output to color, not grayscale" is checked. if unchecked, the alpha layer is correct.
Comment 5 Bug Janitor Service 2021-03-12 04:33:44 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 6 wolthera 2021-09-09 12:34:43 UTC
With the test file, I am getting the alpha channel correctly, so I think it may have gotten fixed. If you can still reproduce it on Krita 5.0 or later, don't hesitate to reopen this report.
Comment 7 some dude 2021-09-10 10:31:32 UTC
(In reply to wolthera from comment #6)
> With the test file, I am getting the alpha channel correctly, so I think it
> may have gotten fixed. If you can still reproduce it on Krita 5.0 or later,
> don't hesitate to reopen this report.

Reproduced it in Krita 5.0 beta
Separate Image ->
Current Layer
Create separate separation from alpha channel
Output to color, not grayscale
= produces black rectangle instead of alpha channel
Comment 8 wolthera 2021-09-13 13:13:33 UTC
Then we'll need more information, as it works for me on KDE Neon based on Ubuntu 20.04 :/
Comment 9 wolthera 2021-09-13 13:14:56 UTC
No, wait, the color bit is the devil.
Comment 10 wolthera 2021-09-15 14:41:06 UTC
Git commit 5d81078e29d71b5cce6f104ecbc84385eecb4036 by Wolthera van Hövell tot Westerflier.
Committed on 15/09/2021 at 14:39.
Pushed by woltherav into branch 'krita/5.0'.

Use grayscale code path for alpha in image separation.

The color code sets alpha to opaque, and the result of the
grayscale code seems to be what is expected in this case.

M  +8    -8    plugins/extensions/separate_channels/kis_channel_separator.cc

https://invent.kde.org/graphics/krita/commit/5d81078e29d71b5cce6f104ecbc84385eecb4036
Comment 11 wolthera 2021-09-15 14:41:32 UTC
Git commit 9005f1b8e590b272ae6b0c8ef05c4f40a8c4ded4 by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 15/09/2021 at 14:41.
Pushed by woltherav into branch 'master'.

Use grayscale code path for alpha in image separation.

The color code sets alpha to opaque, and the result of the
grayscale code seems to be what is expected in this case.


(cherry picked from commit 5d81078e29d71b5cce6f104ecbc84385eecb4036)

M  +8    -8    plugins/extensions/separate_channels/kis_channel_separator.cc

https://invent.kde.org/graphics/krita/commit/9005f1b8e590b272ae6b0c8ef05c4f40a8c4ded4