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 603620 - GIMP linear rescale with artifact
GIMP linear rescale with artifact
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.7.4
Other All
: Normal minor
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-12-02 16:57 UTC by Yann Droneaud
Modified: 2014-02-21 23:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Original image (5x5) (114 bytes, image/png)
2009-12-02 16:58 UTC, Yann Droneaud
Details
Image rescaled (linear) with gimp 2.4.7 (559x505) (52.57 KB, image/png)
2009-12-02 17:00 UTC, Yann Droneaud
Details
Image rescaled (linear) with another program (559x505) (59.19 KB, image/png)
2009-12-02 17:01 UTC, Yann Droneaud
Details
Diff (xor) between image rescaled with gimp 2.4.7 and with another tool (147.36 KB, image/png)
2009-12-02 17:03 UTC, Yann Droneaud
Details
Image rescaled (linear) with gimp 2.6.7 (559x505) (57.92 KB, image/png)
2009-12-02 17:22 UTC, Yann Droneaud
Details
Diff (xor) between image rescaled with gimp 2.6.7 and with another tool (173.41 KB, image/png)
2009-12-02 17:24 UTC, Yann Droneaud
Details
Diff (xor) between image rescaled with gimp 2.4.7 and gimp 2.6.7 (130.80 KB, image/png)
2009-12-02 17:30 UTC, Yann Droneaud
Details
image rescaled (linear) with gimp 2.7.4 (fc17) (58.61 KB, image/png)
2012-02-27 20:21 UTC, Yann Droneaud
Details
Diff (xor) between image rescaled with another tool and with gimp 2.7.4 (fc17) (191.82 KB, image/png)
2012-02-27 20:38 UTC, Yann Droneaud
Details
Diff (xor) between image rescaled with gimp 2.6 and with gimp 2.7.4 (fc17) (2.47 KB, image/png)
2012-02-27 20:43 UTC, Yann Droneaud
Details

Description Yann Droneaud 2009-12-02 16:57:32 UTC
While comparing results of multiple linear rescale implementations,
I found the one used in GIMP produces some little artifacts, so little that
I'm using a bigger than x100 scale factor to report the bug with sample images.

See following attachments:
 - original image
 - gimp rescaled image
 - other rescaled image
 - diff (xor'ed) between the two rescaled image.
Comment 1 Yann Droneaud 2009-12-02 16:58:43 UTC
Created attachment 148924 [details]
Original image (5x5)
Comment 2 Yann Droneaud 2009-12-02 17:00:00 UTC
Created attachment 148925 [details]
Image rescaled (linear) with gimp 2.4.7 (559x505)
Comment 3 Yann Droneaud 2009-12-02 17:01:15 UTC
Created attachment 148926 [details]
Image rescaled (linear) with another program (559x505)
Comment 4 Yann Droneaud 2009-12-02 17:03:18 UTC
Created attachment 148928 [details]
Diff (xor) between image rescaled with gimp 2.4.7 and with another tool
Comment 5 Yann Droneaud 2009-12-02 17:07:30 UTC
As you can see on the gimp rescaled image, the image is not symmetric: 
there are some little shade of blue on the left side that are not on the right side. The image produced by the other tool doesn't show such artifact.

(BTW, I can't tell you that the other tool result is perfect, even if i've coded it, but it seems better than the current gimp version i'm using).
Comment 6 Yann Droneaud 2009-12-02 17:22:06 UTC
Created attachment 148932 [details]
Image rescaled (linear) with gimp 2.6.7 (559x505)

See the color fringes on the top.
Comment 7 Yann Droneaud 2009-12-02 17:24:18 UTC
Created attachment 148933 [details]
Diff (xor) between image rescaled with gimp 2.6.7 and with another tool
Comment 8 Yann Droneaud 2009-12-02 17:30:18 UTC
Created attachment 148934 [details]
Diff (xor) between image rescaled with gimp 2.4.7 and gimp 2.6.7

In this last attachment, one can see the difference between gimp 2.4 and gimp 2.6.
It's hard to explain such differences ... compilation, optimization related ?
Comment 9 Yann Droneaud 2009-12-02 17:39:46 UTC
(In reply to comment #8)
> Created an attachment (id=148934) [details]
> Diff (xor) between image rescaled with gimp 2.4.7 and gimp 2.6.7
> 
> In this last attachment, one can see the difference between gimp 2.4 and gimp
> 2.6.
> It's hard to explain such differences ... compilation, optimization related ?

Not so hard in fact. Someone point me to this comment on bug #557950 <https://bugzilla.gnome.org/show_bug.cgi?id=557950#c1>

So the new version show twice more artifact than the previous.
Comment 10 Michael Natterer 2012-01-08 22:59:47 UTC
Please try GIMP 2.7.4 and report back, we won't fix 2.6 bugs any longer.
Comment 11 Akhil Laddha 2012-02-22 11:02:16 UTC
Could you please try to reproduce problem with GIMP 2.7.4 or later version and update the bug report with your findings, tia.
Comment 12 Yann Droneaud 2012-02-27 20:21:14 UTC
Created attachment 208517 [details]
image rescaled (linear) with gimp 2.7.4 (fc17)

Here is a copy of image original image scaled using "linear" algorithm in GIMP 2.7.4 (from Fedora 17).
Comment 13 Yann Droneaud 2012-02-27 20:38:18 UTC
Created attachment 208520 [details]
Diff (xor) between image rescaled with another tool and with gimp 2.7.4 (fc17)

Comparing the results of GIMP 2.7.4, I think there's no change on GIMP between 2.6 and 2.7.4.
Comment 14 Yann Droneaud 2012-02-27 20:43:34 UTC
Created attachment 208526 [details]
Diff (xor) between image rescaled with gimp 2.6 and with gimp 2.7.4 (fc17)

This is confirmed by this comparison: there's no change in the "linear" rescale algorithm between GIMP 2.6 and GIMP 2.7.4.
Comment 15 Michael Natterer 2012-02-27 20:45:23 UTC
Thanks for checking.
Comment 16 Massimo 2013-05-25 14:48:33 UTC
This problem is fixed in the branch gimp-2-8 after this commit:

commit e09233f08074212db8994bfffbca6ec3ecbefe32
Author: Massimo Valentini <mvalentini@src.gnome.org>
Date:   Sat Oct 13 14:56:47 2012 +0200

    Bug 592628: Scale Image adds asymmetric artifacts to image edges

    first problem described.

I repeated the sequence described in the description and
now the difference is minimal, probably different rounding
errors. Feel free to reopen if I missed something.