patch for scale-region.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

after spending quite some time with the new scale code, I have some
doubts about the way that it is scaling down. So here's a patch that I
am playing with at the moment:

 http://sven.gimp.org/misc/gimp-decimate.diff

This patch applies against SVN trunk. It only changes the current
behavior when scaling the image down. The strategy it applies is that
for scale ratios < 0.5, the image is decimated using a simple box filter
until it has a size that is only up to two times larger than the desired
size. At this point the standard interpolation algorithm is used to
scale the image to the final size. Of course for interpolation-none, no
box filter is used, but the nearest pixel is chosen.

I haven't done much testing with this patch yet, but overall it seems to
give better results than the code that is currently in trunk (and it is
a little bit faster). However, there are some corner cases like the
Moire rings in  http://svenfoo.org/scaletest/12-6.html where the results
are worse.

If someone is interested, please apply the patch and try some of the
problematic images in the previous scaletest. Your feedback is very much
appreciated.


Sven


_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux