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 698601 - scaling up without alpha adds several-pixel gradient border
scaling up without alpha adds several-pixel gradient border
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other Linux
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2013-04-22 18:26 UTC by Akkana Peck
Modified: 2014-02-23 23:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Gradient border at top left of scaled image (7.15 KB, image/jpeg)
2013-04-22 18:26 UTC, Akkana Peck
Details

Description Akkana Peck 2013-04-22 18:26:21 UTC
Created attachment 242159 [details]
Gradient border at top left of scaled image

My wallpaper.py script is leaving a light border on the top and left of images when it scales them up. Happens in git master, not in 2.8 or earlier. Here's how to reproduce this manually:

1. Load an image: I'm starting with http://farm9.staticflickr.com/8022/7684967220_f0ea46b2e1_b.jpg

2. Set rect select properties to constrain to 1680:1050 (this step probably isn't necessary).

3. Make a selection that's most of the size of the image (doesn't have to extend all the way to the edges).

4. Edit->Copy

5. Edit->Paste as new image

6. In the new image, Image->Flatten
   This step is important: if you don't flatten, the bug won't happen.

7. Image->Scale to 1680 width. (Height won't be exactly 1050; that's annoying but it's not this bug.) I'm using Cubic. Note that I'm scaling UP (original image size is 1024x638).

8. After scaling, magnify the image to 400% or more and pan to the top left. You'll see a border as in the screenshot I'm attaching.
Comment 1 Téo Mazars 2013-04-23 18:22:53 UTC
Thanks for reporting this.

Unfortunately, we can not reproduce the issue. Something that could explain the behavior is a selection with a feather edges. Can you check?

Also, this white border appear in the four edges or just on right and top one (you mention top left)

You can try to provide a more general case showing the bug... Is there already a (small) white border before you scale up? Does this border is "proportinal" to the scaling? Does it appear when you copy-past the whole image wihtout selection?

Thanks
Comment 2 Akkana Peck 2013-04-24 02:05:11 UTC
I can make it happen pretty repeatably, and it turns out I don't even need to scale. And indeed, it does happen even without making a selection. Here's a shorter set of instructions:

- Open a jpeg with a dark image in it (at least, something that's dark at the top left).
- Edit->Copy
- Edit->Paste as New Image

- (Optional, so you can see the effect happen:) In the new image, zoom to 300% (I hit + three times), then pan the image down and right past the upper left corner -- so you can see the upper left corner plus some blank space past it. (It's easier to see the effect than when it's at the corner of the viewport.)

- In the new image, Image->Flatten

You'll see a top border and a left border appear, light in color, anywhere from one to three pixels in width. Sometimes it's just a single pixel strip of white, sometimes it's a three pixel gradient; it may be sensitive to the size of the image, I haven't found a regularity.

It's always the top and left. The right and bottom of the image look normal. (Possibly a few rows/columns of pixels are missing there; I haven't tried to determine that.)

It's definitely the Flatten that's doing it. And curiously, when you copy from a jpeg without making a selection first, there's no alpha channel, so Flatten isn't doing anything (except introducing this light border).
Comment 3 Michael Natterer 2013-04-24 08:48:41 UTC
I can't reproduce this at all, the pasted image is 100% identical. After
scaling, the top left is totally crisp.

Do you really run latest babl, gegl and gimp from git?
Comment 4 Akkana Peck 2013-04-25 03:00:52 UTC
That was it -- my gegl was out of date. Updating gegl got rid of the bug. So this is fixed, and I'm marking it so. Thanks for looking! and for the suggestion.