GNOME Bugzilla – Bug 603620
GIMP linear rescale with artifact
Last modified: 2014-02-21 23:18:06 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.
Created attachment 148924 [details] Original image (5x5)
Created attachment 148925 [details] Image rescaled (linear) with gimp 2.4.7 (559x505)
Created attachment 148926 [details] Image rescaled (linear) with another program (559x505)
Created attachment 148928 [details] Diff (xor) between image rescaled with gimp 2.4.7 and with another tool
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).
Created attachment 148932 [details] Image rescaled (linear) with gimp 2.6.7 (559x505) See the color fringes on the top.
Created attachment 148933 [details] Diff (xor) between image rescaled with gimp 2.6.7 and with another tool
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 ?
(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.
Please try GIMP 2.7.4 and report back, we won't fix 2.6 bugs any longer.
Could you please try to reproduce problem with GIMP 2.7.4 or later version and update the bug report with your findings, tia.
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).
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.
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.
Thanks for checking.
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.