Bug 461078 - When I use the layer style "Stroke" and exported as a PNG file and reduced the size the thickness of the Stroke Style lines continue same
Summary: When I use the layer style "Stroke" and exported as a PNG file and reduced th...
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: layer styles (show other bugs)
Version: 5.1.5
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 459295 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-10-27 18:09 UTC by jamesfoxbr
Modified: 2023-05-20 19:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
A image with a example of the same lines on Krita before export (on left and after export in a external image viewer (on right) (623.32 KB, image/png)
2023-05-20 19:12 UTC, jamesfoxbr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jamesfoxbr 2022-10-27 18:09:37 UTC
SUMMARY
When I use the layer style "Stroke" and exported as a PNG file and reduced the size the thickness of the Stroke Style lines continue same.


STEPS TO REPRODUCE
1. Create some image in a normal raster layer and apply the layer style called Stroke with a thick stroke to make easy to perceive
2. use the advanced Export to export the image to png reducing the size and you will notice the stroke style will not reduce the thickness will continue a thick strike and because the image is smaller the thickness of the stroke will look bigger
3. 

OBSERVED RESULT
The stroke of the exported and reduced image will continue with the same original thickness make it thicker in the exported version

EXPECTED RESULT
The stroke need to be reduced too when a image is reduced during exportation

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

ADDITIONAL INFORMATION
Comment 1 wolthera 2023-01-12 13:38:16 UTC
Hi, thank you for your report.

I can confirm with the Krita Version: 5.2.0-prealpha (git 5c98a72) Appimage with Qt 5.15.7

Layer styles in general are not resized when scaling, resulting in this effect.
Comment 2 wolthera 2023-01-16 15:10:53 UTC
*** Bug 459295 has been marked as a duplicate of this bug. ***
Comment 3 fluffy 2023-05-20 09:38:33 UTC
This happens on the 5.1.5 macOS build as well.

The nature of this bug makes me wonder if the export is compositing the layers after scaling, rather than compositing the whole image first before scaling it to the target size. Is that the case, and if so, is there some reason for it to work that way? That could cause issues with accuracy with alpha blending on more complex images.

The obvious workaround from an end-user perspective is to currently save out the image at its current resolution and then to use an external tool such as Imagemagick to resize the final image, or doing a select all/copy merged/paste into new image that then gets scaled down. It would be nice if the export function did that automatically, though.
Comment 4 jamesfoxbr 2023-05-20 19:12:46 UTC
Created attachment 159146 [details]
A image with a example of the same lines on Krita before export (on left and after export in a external image viewer (on right)