Bug 442209 - LittleCMS optimization is cause severe artifacts in Transform tool
Summary: LittleCMS optimization is cause severe artifacts in Transform tool
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (other bugs)
Version First Reported In: 5.0.0-beta1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-09 09:06 UTC by Tyson Tan
Modified: 2021-09-15 04:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Krita 5.0 Transform tool artifacts (553.87 KB, image/png)
2021-09-09 11:51 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2021-09-09 09:06:06 UTC
Krita's Transform tool causes severe transparent artifacts that actually rendered into the result. It only happens when the canvas behind the transformed layer has nothing to cover its transparent areas.

Steps to reproduce:

1) Open a JPG (which has only 1 layer)
2) Transform tool
3) Move or rotate the layer
4) Huge blocks of pixels goes in and out of transparency.
5) Hit Apply
6) The artifacts are rendered into the result.

* The transform tool is also very choppy now, which is a recent development.

Workaround:
1) Insert a layer below the transformed layer
2) Fill it with white
3) Transform
4) Now it doesn't generate artifacts, but still very choppy.

Tested with krita-5.0.0-beta1-92c6cb6-x86_64.appimage
Comment 1 Halla Rempt 2021-09-09 09:09:49 UTC
The transform tool now renders inside the layer stack, and that is slower. This cannot be made faster, sorry. You can re-enable the old behaviour in the settings. 

I cannot reproduce any artefacts when testing with a jpeg image of one layer.
Comment 2 Tyson Tan 2021-09-09 11:51:32 UTC
Created attachment 141420 [details]
Krita 5.0 Transform tool artifacts

After a little test, I've found that the issue is, again, LittleCMS optimization related.

When these options are on:
1) Use system monitor profile (I have one)
2) Allow Little CMS optimizations

It will cause all kinds of artifacts in almost every HUD elements on canvas. I think we should take look into this optimization a bit more...
Comment 3 Tyson Tan 2021-09-09 11:53:13 UTC
BTW, after setting Allow LittleCMS Optimizations, you must restart Krita to see the difference in case of the artifacts.
Comment 4 Halla Rempt 2021-09-09 11:53:27 UTC
Okay, the good news is that we're getting patches into lcms to fix those issues.

Cc'ing amyspark so this bug can be in the list of closable bugs once those fixes land in the deps build.
Comment 5 Tyson Tan 2021-09-09 11:57:35 UTC
Thanks! That's good to know.
Comment 6 Tyson Tan 2021-09-15 04:13:40 UTC
The bug has been fixed with the latest LCMS patches.