Bug 514406

Summary: [regression] liquify artifact when it's smudged cross transform tool boundary
Product: [Applications] krita Reporter: Ming Chuan <ming>
Component: * UnknownAssignee: Krita Bugs <krita-bugs-null>
Status: REOPENED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: first pic
second pic

Description Ming Chuan 2026-01-10 08:12:54 UTC
Created attachment 188378 [details]
first pic

SUMMARY

Probably a very recent regression, didn't notice this until today, and I can't repro on 5.2.14

Please refer reproduction steps and attached images

STEPS TO REPRODUCE
1. Draw a stroke on canvas and start free transform tool (ctrl+T) (see the first attachment)
2. Right click and select liquify tool
3. Drag the pixel down so it crosses the boundary
4. Apply the transform, notice that there is a transparent edge at where the transform tool (selection) boundary was. See the second attachment

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
krita rev: 3f968be4ab (master at 2026-01-10)
krita-6.0.0-prealpha-3f968be4ab-x86_64 linux appimage
repro on both qt5 and qt6
wayland

ADDITIONAL INFORMATION
Comment 1 Ming Chuan 2026-01-10 08:13:23 UTC
Created attachment 188379 [details]
second pic
Comment 2 Dmitry Kazakov 2026-01-19 11:20:03 UTC
Git commit d7f78faa6c0d186e4faaa01141291ae750225617 by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 19/01/2026 at 11:19.
Pushed by dkazakov into branch 'master'.

Fix offsets in Liquify transform tool

Before this commit, if you had a rectangular selection and tried to
use Liquify on it, there would be a line of one pixel on the bottom
and on the right side of the selection of unchanged pixels.
There would also be weird misalignments all over the
place when transforming. It would be likely invisible to naked eye when
iused on a picture besides some very unlucky gaps in certain
circumstances, but they were visible when used with debug painting
mode. This commit fixes them and finally all the polygons look correct
and there are no gaps.

M  +17   -5    libs/image/kis_grid_interpolation_tools.h
M  +16   -6    libs/image/kis_liquify_transform_worker.cpp

https://invent.kde.org/graphics/krita/-/commit/d7f78faa6c0d186e4faaa01141291ae750225617
Comment 3 Ming Chuan 2026-01-20 05:05:31 UTC
I synced to master and can confirm that the the transform result is all good, but now the artifact appears in the preview, the transparent pixel line artifact randomly appears on the right boundary and bottom boundary (about 50% chance happening).
Comment 4 Ming Chuan 2026-01-20 05:07:37 UTC
Maybe it's some kind of off-by-one even/odd rounding bug depending on selection size?