[Gimp-developer] patch for scale-region.c
Sven Neumann
sven at gimp.org
Thu Aug 28 00:54:21 PDT 2008
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
More information about the Gimp-developer
mailing list