GNOME Bugzilla – Bug 793734
White alpha border after upscaling
Last modified: 2018-03-22 21:19:49 UTC
Created attachment 368802 [details] screenshot2 GIMP 2.9.8 18794a6ba2 1. Download this JPG in its original size https://en.wikipedia.org/wiki/File:ALMA_Panoramic_View_with_Carina_Nebula.jpg 2. Open it in GIMP. When it asks "Convert to RGB working space?", I click Convert, using relative colorimetric and bpc. Not sure if relevant. My "Image Import" settings are to promote imported images to floating point precision and to add an alpha channel to imported images, no dithering. See screenshot 1. 3. Zoom to a corner. All good, solid almost-black RGBA=(1.2%,0,0,100%) 4. Upscale 200% using cubic interpolation. 5. Check the corners or edges. Now there's a semi-transparent frame around the periphery. See screenshot 2.
Created attachment 368803 [details] screenshot1
Thanks... I was pretty sure we had that sorted out already, pippin?
I think this is a duplicate of (or it depends on) GEGL bug #698468. An opaque layer (with alpha) is resampled as if it was transparent outside the actual content and so along the edges there is a transition from transparent to opaque that let what's behind appear, in this case it is the checkered pattern rather than white
The GEGL part is fixed as part of bug 698468. The GIMP part is fixed in master by: commit 289ecebd69ffa0b58fee368c8afc1a49423af06a Author: Ell <ell_se@yahoo.com> Date: Thu Mar 22 16:53:08 2018 -0400 Bug 793734 - White alpha border after upscaling In gimp_gegl_apply_scale(), use a CLAMP abyss policy for the scale op, to avoid leaking transparency into the image when scaling drawables. Note that this (intentionally) only affects whole-image/layer scaling, and not scaling done using any of the transform tools. app/gegl/gimp-gegl-apply-operation.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
Great!