After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 553855 - Bucket fill colour is always blended with filled pixel colour when threshold > 0
Bucket fill colour is always blended with filled pixel colour when threshold > 0
Product: GIMP
Classification: Other
Component: Tools
Other All
: Normal minor
: 2.10
Assigned To: GIMP Bugs
Depends on:
Reported: 2008-09-25 22:21 UTC by Matt Underwood
Modified: 2016-09-15 10:30 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Matt Underwood 2008-09-25 22:21:12 UTC
Please describe the problem:
The problem was observered when attempting to remove a large area of near white pixels around a logo (from a scanned image). Because the near white pixels are all slightly different colours I attempted to use a FG fill with 100% opacity and a threshold of 10 to convert all of the near white pixels to my target colour. I used purple as my target colour to determine if my tolerance would match the necessary pixels. The tolerance match works as expected, however the filled in colour isn't the same consistent solid purple - but is instead blended with the matched pixel's colour

Steps to reproduce:
1. Create a new solid white image, say 200x200 px
2. Use the "Filters"->"Noise"->"RGB Noise" tool to add random noise to the image (I used 0.2,0.2,0.2 for the RGB values)
3. Use "Colours"->"Desaturate" to give a grey scale (near white) image. This is our starting case
4. Select the "Bucket Fill" tool, pick an obvious fill colour (I chose #FF00FF), Mode=Normal, Opacity=100, Type=FG colour, Area=Fill Similar, Fill transparent=checked, Sample Merged=unchecked, Threshold=10.0, Fill By:Composite or Value
5. Left click somewhere in the image to being the fill
6. Observer that the filled pixels aren't all uniformly #FF00FF

Actual results:
Some proportion of the pixels are filled (based on the tolerance setting). The filled colour is not uniformly the fill colour selected - as if a non 100% opacity were being used

Expected results:
Some proportion of the pixels should be filled (based on the tolerance setting). The filled pixels should all be exactly the fill colour I selected.

Does this happen every time?

Other information:
Comment 1 Michael Natterer 2008-09-26 09:01:04 UTC
You make a very good point here, and frankly, I have never noticed this
behavior myself.

It remains to be discussed whether any of the behaviors is "correct"
or if it is desirable to have both as an option.

Thanks anyway for this really high quality bug report.
Comment 2 Matt Underwood 2008-10-05 12:52:21 UTC
I'd agree it's difficult to determine which is correct. My personal opinion is that the current behaviour isn't correct based on past experience of other similar software. I'd also argue that the fill isn't respecting the 100% opacity setting - and from that standpoint the current behaviour is wrong.
Comment 3 Michael Natterer 2012-10-07 02:04:23 UTC
Actually, this is simply the "gboolean antialias" parameter in
gimp_image_contiguous_region_by_seed() which is used internally.
We simply need a decision here, setting milestone.
Comment 4 Michael Natterer 2016-09-15 10:30:10 UTC
Fixed in master:

commit 572d55664314a0deb58a336924e08eba2d30441a
Author: Michael Natterer <>
Date:   Thu Sep 15 12:24:37 2016 +0200

    Bug 553855 - Bucket fill colour is always blended with filled pixel colour...
    ...when threshold > 0
    Add an "Antialias" toggle to the bucket fill options and set it on the
    GimpFillOptions. In gimp_drawable_bucket_fill(), pass it to
    gimp_pickable_contiguous_region_by_seed() instead of always defaulting
    to TRUE.
    The position of the toggle and its huge tooltip may need some

 app/core/gimpdrawable-bucket-fill.c |  5 ++++-
 app/tools/gimpbucketfilloptions.c   | 28 ++++++++++++++++++++++++++++
 app/tools/gimpbucketfilloptions.h   |  1 +
 app/tools/gimpbucketfilltool.c      |  2 ++
 4 files changed, 35 insertions(+), 1 deletion(-)