On Sat, 06 Sep 2008 00:22:58 +0200, Sven Neumann <[EMAIL PROTECTED]> wrote:
> while I see your points and I appreciate your comparisons of the
> results, fact is that the current code has bugs that are fixed by my
> patch. The most apparent problem is that the current code is using the
> 2-dimensional decimation routines even when downscaling only in one
> direction. To see this, create a new image, apply a standard grid on it
> using Filter->Render->Patterns->Grid and scale it down in one direction
> by a scale factor smaller than 0.5. The one pixel wide grid lines will
> become blurry. I don't think this is acceptable and so far the only
> choice we have is to apply either gimp-decimate.diff or
> gimp-decimate-2.diff as found on http://sven.gimp.org/misc/. So far I am
> in favor of applying gimp-decimate.diff. Unless someone objects and
> provides an alternative, I will commit this change this weekend.
Clearly trapping the special case of only scaling in one dimension is a
worthwhile optimisation. That would seem to be a separate issue from
fundementally changing the scaling algo. Could I suggest you break these
two changes into separte patches.
I had a quick look at the current code during the week and found it hard
to recognise the "lanczos" in decimateLanczos2() . There seems to be some
sort of gaussian filter being applied which probably accounts for the
softening. I'm not sure this is necessary if reduction is indeed using
lanczos since it is in itself a frequency filter. It may however been
needed with the current code which appears to use fixed coeffs and
therefore cannot presumably be a filter tuned to the specific scaling.
In any case the results are quite good and the code seems stable in the
limitted testing I've been able to do.
I doubt I'll have time to get into coding any changes in the immediate
future but if you can split the patch it would make developing a more
rigourous filter easier in the future.
Gimp-developer mailing list