GNOME Bugzilla – Bug 795866
Transparent gradient on transparent layer drifts/sharpens when applying additional gradients
Last modified: 2018-05-07 19:07:54 UTC
I'm on GIMP 2.10.0 on Debian Unstable. Reproduction: 1. open a new image with transparent background. 2. select gradient tool. 3. set gradient to FG->Transparent mode 4. drag a gradient left-to-right across center of the image. that should look as expected. 5. drag another gradient left-to-right on the left margin of the image. 6. while that would normally not do anything to see, it instead causes the existing gradient to "sharpen", or increase contrast. 7. drag a couple more gradients that shouldn't be seen and watch the visible gradient change some more. On a non-transparent background, multiple gradients on the same layer work as expected. I discovered this while trying to darken the corners on a transparent layer and noticed them getting darker when I didn't intend them to change.
I don't know what you mean by "while that would normally not do anything to see". You add gradients on top of each other, and the color adds up because there is transparency in the gradient. Seems to work 100% as expected on both opaque and transparent layers. What is the paint mode you are using?
The paint mode is the first dropdown in the gradient's tool options? It's set to "Normal". More specifically, I drag my FG->Transparent gradient from +250 to +500 on X, then I drag the second from -500 to -250 (off image). Since that would only be laying the transparent side on the existing/visible gradient, I'd expect to see nothing change, but it does. Every time I add that -500 to -250 gradient, it tightens up the transition on the first gradient I added to the image. I tried other paint blend modes in the gradient options, and it does the same thing. I'm seeing this on Debian Unstable, so I'll also see if I can get GIMP 2.10 on OS X and reproduce. If it doesn't reproduce there, I can submit to Debian team as well.
I also just reproduced my issue with fresh configs (not migrated from GIMP 2.8).
Thanks. Fixed in master: commit f3febfe343953ded3f588b5eec193bada02bb4a9 Author: Ell <ell_se@yahoo.com> Date: Mon May 7 14:24:51 2018 -0400 Bug 795866 - Transparent gradient on transparent layer ... ... drifts/sharpens when applying additional gradients In GimpDrawableFilter, don't use gegl:over for operations without an input pad, since this only works if the filter's mode is REPLACE. If the filter's mode is different, in particular, if it's NORMAL, we end up compositing the operation's output against the input twice: once in gegl:over, and again in the filter's applicator. Notably, this happens for the gradient tool. Instead, revert commit 5b80d3d3be25ecbfdbef86d4e11df5abadb1d064 (with some additions to avoid constructing unnecessary nodes when the operation has no input) and simply change the applicator's mode to NORMAL if the oepration doesn't have an input, and the filter's mode is REPLACE. app/core/gimpdrawablefilter.c | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------- 1 file changed, 108 insertions(+), 82 deletions(-)
Thank you!