Bug 461078

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
Product: [Applications] krita Reporter: jamesfoxbr
Component: layer stylesAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: carter.vangelder, fluffy, griffinvalley
Priority: NOR    
Version: 5.1.5   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
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)

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)