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 793734 - White alpha border after upscaling
White alpha border after upscaling
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.9.8
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on: 698468
Blocks:
 
 
Reported: 2018-02-22 22:21 UTC by BugsBunny
Modified: 2018-03-22 21:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot2 (116.58 KB, image/png)
2018-02-22 22:21 UTC, BugsBunny
Details
screenshot1 (43.73 KB, image/png)
2018-02-22 22:21 UTC, BugsBunny
Details

Description BugsBunny 2018-02-22 22:21:16 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.
Comment 1 BugsBunny 2018-02-22 22:21:44 UTC
Created attachment 368803 [details]
screenshot1
Comment 2 Michael Natterer 2018-02-23 10:40:31 UTC
Thanks... I was pretty sure we had that sorted out already, pippin?
Comment 3 Massimo 2018-03-15 09:13:29 UTC
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
Comment 4 Ell 2018-03-22 21:05:45 UTC
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(-)
Comment 5 BugsBunny 2018-03-22 21:19:49 UTC
Great!