| Summary: | 1 pixel lines exceed after using Transform tool | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | nambinh1095 |
| Component: | Tools/Transform | Assignee: | Dmitry Kazakov <dimula73> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | dimula73, halla, manuel.snudl.zeidler, xnagytibor |
| Priority: | NOR | ||
| Version First Reported In: | 4.2.7 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | https://invent.kde.org/graphics/krita/commit/26ddc0bed921d20f4331f25e4383752cffa8580e | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | The screenshot | ||
|
Description
nambinh1095
2019-10-31 13:02:14 UTC
Created attachment 123619 [details]
The screenshot
I can reproduce this. At first I thought it was an issue with snapping and zoom level, but even placing the transform handles pixel perfect can result in this 1 pixel overshoot on 1 or more edges after applying the transformation. It looks like there is a mismatch in the active preview of the Transform Tool. I can click and press ESC repeatedly on the previous 1-pixel-off transform result and see that the corner handles and image preview align exactly with the grid. I can still reproduce that Git commit 26ddc0bed921d20f4331f25e4383752cffa8580e by Dmitry Kazakov. Committed on 25/05/2021 at 12:26. Pushed by dkazakov into branch 'master'. Fix pixel alignment when using transform tool on pixel art There were two problems: 1) KisTransformWorker accepted the offset measured in integers, which created a small drift of the whole image 2) KisFilterWeightsApplicator calculated the destination rect too aggressively. The formula might be okay for the filters that have whole-pixel support, but for half-pixel-support filters it caused issues. M +2 -2 libs/image/kis_filter_weights_applicator.h M +11 -6 libs/image/kis_transform_worker.cc M +2 -2 libs/image/kis_transform_worker.h M +42 -0 libs/image/tests/kis_transform_worker_test.cpp M +3 -0 libs/image/tests/kis_transform_worker_test.h M +2 -2 plugins/tools/tool_transform2/kis_transform_utils.cpp https://invent.kde.org/graphics/krita/commit/26ddc0bed921d20f4331f25e4383752cffa8580e *** Bug 429937 has been marked as a duplicate of this bug. *** |