Bug 420811 - Aliasing problem with Perspective tool + nearest neighbor filter
Summary: Aliasing problem with Perspective tool + nearest neighbor filter
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: 4.2.9
Platform: Mint (Debian based) Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-30 16:08 UTC by Xavier Dole
Modified: 2021-06-01 13:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Left : image before transformation (hard edges) - Right : image after transformation (anti aliasing effect) (49.86 KB, image/png)
2020-04-30 16:08 UTC, Xavier Dole
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Dole 2020-04-30 16:08:26 UTC
Created attachment 128034 [details]
Left : image before transformation (hard edges) - Right : image after transformation (anti aliasing effect)

SUMMARY
Transforming an image with "Transform tool-> Perspective-> Filter: Nearest Neighbor should not produce an anti aliasing effect, but it is.

STEPS TO REPRODUCE
1. Load an image with hard edges
2. Select the Transform tool
3. Choose "Perspective" in the tool options
4. Choose "Filter: Nearest Neighbor
5. Clic the image
6. Move one of the four small squares at the corners of the image to distort it
7. Press enter
8. Zoom on the image.


OBSERVED RESULT
Despite the filter "nearest neighbor", an anti aliasing effect has been added.

EXPECTED RESULT
No anti aliasing effect (hard edges)

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Linux Mint 19.3
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I have attached an image as an example:
- Left : image before transformation (hard edges)
- Right : image after transformation (anti aliasing effect)
Comment 1 Dmitry Kazakov 2021-05-24 08:28:38 UTC
I will take this bug :)
Comment 2 Dmitry Kazakov 2021-05-25 10:50:06 UTC
Git commit e0b44f443baa6b9baf1b85432e587865da05819e by Dmitry Kazakov.
Committed on 25/05/2021 at 10:49.
Pushed by dkazakov into branch 'master'.

Fix Nearest Neighbour filter of the perspective transform mode

Perspective transform mode should use nearest neighbour when user
requests it.

M  +50   -4    libs/image/kis_perspectivetransform_worker.cpp
M  +9    -1    libs/image/kis_perspectivetransform_worker.h
M  +7    -2    plugins/tools/tool_transform2/kis_transform_utils.cpp

https://invent.kde.org/graphics/krita/commit/e0b44f443baa6b9baf1b85432e587865da05819e
Comment 3 Dmitry Kazakov 2021-06-01 13:15:20 UTC
Git commit ac4eb8ceadae7a926c835e8afc45b40de482218f by Dmitry Kazakov.
Committed on 01/06/2021 at 12:09.
Pushed by dkazakov into branch 'krita/4.3'.

Fix Nearest Neighbour filter of the perspective transform mode

Perspective transform mode should use nearest neighbour when user
requests it.

M  +50   -4    libs/image/kis_perspectivetransform_worker.cpp
M  +9    -1    libs/image/kis_perspectivetransform_worker.h
M  +7    -2    plugins/tools/tool_transform2/kis_transform_utils.cpp

https://invent.kde.org/graphics/krita/commit/ac4eb8ceadae7a926c835e8afc45b40de482218f