Bug 484677

Summary: Left side of transform mask is aliased
Product: [Applications] krita Reporter: grum999
Component: Tools/TransformAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.2.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: video of transform weird behavior

Description grum999 2024-03-28 18:13:07 UTC
Created attachment 167897 [details]
video of transform weird behavior

SUMMARY
Following the KA topic
https://krita-artists.org/t/krita-transform-tool-produces-aliased-edges/87883/12?u=grum999

STEPS TO REPRODUCE
1. create a layer with  square
2. add a transform mask 
3. apply a X rotation of 30° (but other rotation values can generate the bug)
4. set any algorithm other than Nearest neighbor
 

OBSERVED RESULT
The left side is aliased 
To be more precise, the left side become aliased
check video attached: 
1) we can see the transformation is applied properly
2) after a second, the transformation is updated:
  - left border is aliased 
  - all transformation seems to be moved from ~1pixel to the right 

Note: if transformed layer contains data outside the document bounds, it seems the aliasing is immediate (no delay before the weird alias)


Grum999


EXPECTED RESULT
The applied transform is properly applied, without the aliased affect (and "1px move" effect too)


ADDITIONAL INFORMATION
Tested on Krita 4.2.8 to Krita 5.3, same problem
The delay before alias appear seems to occurs from Krita 4.4.0 (before, the aliasing is immediate)
Comment 1 Deif Lou 2024-04-04 15:01:19 UTC
Git commit 5ae24a5650cccd807a5c0deebc76cde2b493531e by Deif Lou.
Committed on 04/04/2024 at 14:29.
Pushed by deiflou into branch 'master'.

Add 1px padding to rects in KisPerspectiveTransformWorker to account for bilinear filtering

M  +2    -2    libs/image/kis_perspectivetransform_worker.cpp

https://invent.kde.org/graphics/krita/-/commit/5ae24a5650cccd807a5c0deebc76cde2b493531e
Comment 2 Deif Lou 2024-04-04 15:17:24 UTC
Git commit a921cd594454e504cbdafb882ca6c77b861211a1 by Deif Lou.
Committed on 04/04/2024 at 15:17.
Pushed by deiflou into branch 'krita/5.2'.

Add 1px padding to rects in KisPerspectiveTransformWorker to account for bilinear filtering


(cherry picked from commit 5ae24a5650cccd807a5c0deebc76cde2b493531e)

M  +2    -2    libs/image/kis_perspectivetransform_worker.cpp

https://invent.kde.org/graphics/krita/-/commit/a921cd594454e504cbdafb882ca6c77b861211a1