GNOME Bugzilla – Bug 698601
scaling up without alpha adds several-pixel gradient border
Last modified: 2014-02-23 23:08:50 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.
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
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).
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?
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.