Bug 390003

Summary: [filter layer] Issue when saved/exported
Product: [Applications] krita Reporter: David REVOY <info>
Component: Layer StackAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: grave CC: halla, loentar
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: [^ Krita file to reproduce easily the bug]

Description David REVOY 2018-02-07 13:54:19 UTC
Hi,

This is an important bug affecting the usage of Filter Layers and the impact is visible on the *.kra files (mergedimage.png and preview.png) and also on all exported flat documents (*.png, *.jpg). It concerns the data painted on Filter Layers who are rendered differently than expected.

To reproduce:
=============

A. To reproduce quickly with the file in attachement
1. Open the Krita file in attachment in Krita4.0beta1~git-master
2. Compare result visible on Krita canvas and with a version from a "Save/Export to *.png" (or unzip the mergedimage.png and preview.png inside the *.kra file.)
my result: https://www.peppercarrot.com/extras/temp/2018-02-07_screenshot_143641_net.jpg
 
B. To reproduce from scratch:
1. Open a picture of your choice
2. In the Layer docker, press the [+] to create a Filter Layer.
3. Select any filter; for eg. a Gaussian blur of 20px, and accept.
4. Image is blurry, that's good. Select the Filter layer newly created in the layer stack.
5. With a brush paint black color on the filter, just paint a big part you don't want to be blurry. ( or select a part of picture with rectangle selection, and press "suppr" on the keyboard). It will remove the blur effect partially as painting on a mask would do. It's ok, it's a feature.
6. Save your Krita file
7. Compare result visible on Krita canvas and with a version from a "Save/Export to *.png" (or unzip the mergedimage.png and preview.png inside the *.kra file.)

Result:
=======
If you use a thumbnailer for your *.kra files preview in your filemanager you'll immediately spot the difference on the preview. It also affect the mergedimage.png inside the Krita file ( for those who use exporters based on it, as the Pepper&Carrot renderfarm ). You'll see the rendering is totally different of your picture: the information painted on the filter layer are rendered with a mix of opaque area and erased area. ( example with the Krita file in attachement : https://www.peppercarrot.com/extras/temp/2018-02-07_screenshot_143641_net.jpg ). This bug also affect the export of all flat image ( *.jpg/*.png etc...).

Expected:
=========
Getting the same result obtained on the Krita canvas when Saving/Exporting a flat image, or inside the Krita file (mergedimage.png and preview.png).

Thank you!
Comment 1 David REVOY 2018-02-07 13:56:43 UTC
Created attachment 110401 [details]
[^ Krita file to reproduce easily the bug]
Comment 2 Dmitry Kazakov 2018-02-26 11:42:52 UTC
Hi, David!

It seems like I have fixed this bug when solving bug 389174 :) Though I really like your test file! :)

I have even tried to revert that commit to see this magic effect with word "bug" on the canvas :)

See commit:
https://cgit.kde.org/krita.git/commit/?id=0c33e5197a0038256b0c5851e25497d50406a3d4
Comment 3 Dmitry Kazakov 2018-04-02 15:11:08 UTC
*** Bug 389721 has been marked as a duplicate of this bug. ***