<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>475014</bug_id>
          
          <creation_ts>2023-09-29 09:09:29 +0000</creation_ts>
          <short_desc>&quot;Grow until darkest pixel&quot; selection filter misbehaves when some of the reference pixels are fully transparent</short_desc>
          <delta_ts>2023-09-29 12:02:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Tools</component>
          <version>5.2.0-beta2</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Deif Lou">ginoba</reporter>
          <assigned_to name="Deif Lou">ginoba</assigned_to>
          
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/88d2f7692411ba80bf4162d3002abf5d8075d733</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2255968</commentid>
    <comment_count>0</comment_count>
    <who name="Deif Lou">ginoba</who>
    <bug_when>2023-09-29 09:09:29 +0000</bug_when>
    <thetext>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 &quot;growing&quot; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2255996</commentid>
    <comment_count>1</comment_count>
    <who name="Deif Lou">ginoba</who>
    <bug_when>2023-09-29 11:56:34 +0000</bug_when>
    <thetext>Git commit e9c44e4ee29417d47ae6ba73ae63cdceedab4649 by Deif Lou.
Committed on 29/09/2023 at 13:55.
Pushed by deiflou into branch &apos;master&apos;.

Fix misbehavior in the &quot;grow until darkest pixel&quot; selection filter

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

https://invent.kde.org/graphics/krita/-/commit/e9c44e4ee29417d47ae6ba73ae63cdceedab4649</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2255999</commentid>
    <comment_count>2</comment_count>
    <who name="Deif Lou">ginoba</who>
    <bug_when>2023-09-29 12:02:26 +0000</bug_when>
    <thetext>Git commit 88d2f7692411ba80bf4162d3002abf5d8075d733 by Deif Lou.
Committed on 29/09/2023 at 14:02.
Pushed by deiflou into branch &apos;krita/5.2&apos;.

Fix misbehavior in the &quot;grow until darkest pixel&quot; selection filter

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

https://invent.kde.org/graphics/krita/-/commit/88d2f7692411ba80bf4162d3002abf5d8075d733</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>