Bug 475014

Summary: "Grow until darkest pixel" selection filter misbehaves when some of the reference pixels are fully transparent
Product: [Applications] krita Reporter: Deif Lou <ginoba>
Component: ToolsAssignee: Deif Lou <ginoba>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.2.0-beta2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Deif Lou 2023-09-29 09:09:29 UTC
Basically the fully transparent pixels in the reference image used by some tools (fill tool, for example) can be darker than the [semi]transparent ones (for example, if they were not painted yet they have zero as color components). This leads to issues when filling some transparent region surrounded by some color lighter than the one in the fully transparent regions: since the fully transparent pixels are darker, the fill is stopped from "growing" into the lines. See this thread in KA: https://krita-artists.org/t/question-about-stop-growing-fill/

STEPS TO REPRODUCE
1. On a transparent layer paint some closed contour with anti-aliased edges with a color other than black.
2. Use the fill tool in the interior of the contour. Use a small threshold (1 for example) so that the flood fill itself does not cover the anti-alias pixels. 

OBSERVED RESULT
The fill does not grow over the contour lines if they have a color other than black.

EXPECTED RESULT
The fill should grow over the contour, ignoring the color components of the fully transparent pixels
Comment 1 Deif Lou 2023-09-29 11:56:34 UTC
Git commit e9c44e4ee29417d47ae6ba73ae63cdceedab4649 by Deif Lou.
Committed on 29/09/2023 at 13:55.
Pushed by deiflou into branch 'master'.

Fix misbehavior in the "grow until darkest pixel" selection filter

M  +7    -0    libs/image/kis_selection_filters.cpp

https://invent.kde.org/graphics/krita/-/commit/e9c44e4ee29417d47ae6ba73ae63cdceedab4649
Comment 2 Deif Lou 2023-09-29 12:02:26 UTC
Git commit 88d2f7692411ba80bf4162d3002abf5d8075d733 by Deif Lou.
Committed on 29/09/2023 at 14:02.
Pushed by deiflou into branch 'krita/5.2'.

Fix misbehavior in the "grow until darkest pixel" selection filter

M  +7    -0    libs/image/kis_selection_filters.cpp

https://invent.kde.org/graphics/krita/-/commit/88d2f7692411ba80bf4162d3002abf5d8075d733