Bug 419534

Summary: Artifacts around the tile borders for edge detection filters
Product: [Applications] krita Reporter: Kuntal Majumder <hellozee>
Component: FiltersAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard, dimula73, ghevan, halla
Priority: NOR Keywords: regression
Version First Reported In: 4.2.9   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot showing the issues

Description Kuntal Majumder 2020-04-02 10:22:48 UTC
Created attachment 127187 [details]
Screenshot showing the issues

SUMMARY
Artifacts around tile boundaries after applying edge detection filter from the filter menu and not using a filter layer.  

STEPS TO REPRODUCE
1. Open Krita and make a canvas bigger than the size of the tiles.
2. Draw something and open the edge detection filter dialog from the menu.
3. Try any combination of filters other than when output type is All Sides or direction in radians.

OBSERVED RESULT
Borders of tiles will be visible as artifacts.

EXPECTED RESULT
No such artifacts.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon User Edition
(available in About System)
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.3
Qt Version: 5.14.1
Comment 1 Ahab Greybeard 2020-04-02 15:24:07 UTC
I can confirm this, as described, for the Apr-01 4.3.0-prealpha (git 62b9516) appimage.
It does not happen when using a filter mask either.
Comment 2 Halla Rempt 2020-04-03 12:22:46 UTC
This is a regression introduced after the release of 4.2.6; 4.2.6 was still fine.
Comment 3 Dmitry Kazakov 2020-06-08 20:53:08 UTC
Git commit 679ebac38cda1c500cd3013bf783787b1bede5de by Dmitry Kazakov.
Committed on 08/06/2020 at 20:52.
Pushed by dkazakov into branch 'krita/4.3'.

Fix border artifacts in edge-detection filters

KisConvolutionPainter::applyMatrix() will automatically read more
data outside the passed `areaSize` if it is needed for the kernel.
There is no need to pass bigger area to the painter.

M  +8    -3    libs/image/kis_convolution_painter.h
M  +15   -29   libs/image/kis_edge_detection_kernel.cpp

https://invent.kde.org/graphics/krita/commit/679ebac38cda1c500cd3013bf783787b1bede5de
Comment 4 Dmitry Kazakov 2020-06-08 20:54:08 UTC
Git commit e3c0816bc11f990c546195ea63cfc5a376107b82 by Dmitry Kazakov.
Committed on 08/06/2020 at 20:54.
Pushed by dkazakov into branch 'master'.

Fix border artifacts in edge-detection filters

KisConvolutionPainter::applyMatrix() will automatically read more
data outside the passed `areaSize` if it is needed for the kernel.
There is no need to pass bigger area to the painter.

M  +8    -3    libs/image/kis_convolution_painter.h
M  +15   -29   libs/image/kis_edge_detection_kernel.cpp

https://invent.kde.org/graphics/krita/commit/e3c0816bc11f990c546195ea63cfc5a376107b82
Comment 5 Dmitry Kazakov 2020-06-09 08:02:55 UTC
Git commit e43d84b2c96d7e96a19065a5c4a664baaaaeac7c by Dmitry Kazakov.
Committed on 08/06/2020 at 20:54.
Pushed by rempt into branch 'krita/4.3.0'.

Fix border artifacts in edge-detection filters

KisConvolutionPainter::applyMatrix() will automatically read more
data outside the passed `areaSize` if it is needed for the kernel.
There is no need to pass bigger area to the painter.

M  +8    -3    libs/image/kis_convolution_painter.h
M  +15   -29   libs/image/kis_edge_detection_kernel.cpp

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