Bug 389346 - Split layers on Colorize Mask doesn't work properly (takes ages, cannot be canceled) while it works fast after converting the mask into a paint layer
Summary: Split layers on Colorize Mask doesn't work properly (takes ages, cannot be ca...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Colorize (show other bugs)
Version: 4.0.0-beta.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-01-23 16:07 UTC by razvanc87
Modified: 2021-06-09 05:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
select the 'colorization mask', choose 'split layers...' -> it takes forever. If canceled the progress just starts over from 0% (3.38 MB, application/x-krita)
2018-01-23 16:07 UTC, razvanc87
Details

Note You need to log in before you can comment on or make changes to this bug.
Description razvanc87 2018-01-23 16:07:06 UTC
Created attachment 110075 [details]
select the 'colorization mask', choose 'split layers...' -> it takes forever. If canceled the progress just starts over from 0%

So on a moderate image size 3.8 x 2K resolution I tried the 'colorization mask' method. After finishing a very simple drawing, the 'split layers' step doesn't seem to finish or at least it takes >15 min to complete. It makes this pretty much useless. I've attached the image with the problem, fortunately krita saved a backup.
Comment 1 razvanc87 2018-01-23 16:08:51 UTC
Just thought of it, but if I first convert the 'colorization mask' to paint layer then select 'split layer...', the operation finishes quickly <1 sec.
Comment 2 Halla Rempt 2018-01-24 09:19:48 UTC
Hm, https://docs.krita.org/Colorize_Mask does recommend to convert to paint layer first:

"Now we are done, right mouse button the colorize mask and Convert → to Paint Layer. Then, Layer → Split → Split Layer. This will give seperate color islands that you can easily edit: "


However, when I selected the colorize mask and then selected Layer/Split/Split layer the result was the same, and instantaneous.
Comment 3 razvanc87 2018-01-27 08:59:07 UTC
Interesting, maybe OS might be a factor? I'm on Ubuntu 17.10 (xorg-server) now. Wonder why in your case is instantaneous.
Comment 4 Raghavendra kamath 2018-02-03 19:52:01 UTC
I can reproduce this on arch  linux and Krita built from git master.

To reproduce after you are done with generating the colors, disable the edit key in the colorize mask and then select the mask and hit split layers.

Also if edit key is enable it just splits the color maskings for me and not the result.

Also I can't cancel the hung split process in the status bar
Comment 5 Tiar 2020-11-07 19:44:32 UTC
I think the solution here would be, that if the user tried to use Split Layers on a Colorize Mask, it should first (automatically) convert it to Paint Layer and then split the usual way. (It could also default to the number of colors on the colorize mask, if possible). There is no point in having Colorize Mask with splitted colors anyway, so converting won't be a dataloss for the user (and one can always undo).
Comment 6 Dmitry Kazakov 2021-06-09 05:31:00 UTC
Git commit b4e6c662c0c89162b8d134488ebc9d6cfc84af3f by Dmitry Kazakov, on behalf of Srirupa Datta.
Committed on 09/06/2021 at 05:30.
Pushed by dkazakov into branch 'master'.

Convert Colorize Mask to Paint Layer before splitting layers
FIXED IN: 5.0.0

M  +5    -0    plugins/extensions/layersplit/layersplit.cpp

https://invent.kde.org/graphics/krita/commit/b4e6c662c0c89162b8d134488ebc9d6cfc84af3f