Bug 475014 - "Grow until darkest pixel" selection filter misbehaves when some of the reference pixels are fully transparent
Summary: "Grow until darkest pixel" selection filter misbehaves when some of the refer...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: 5.2.0-beta2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Deif Lou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-29 09:09 UTC by Deif Lou
Modified: 2023-09-29 12:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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