David Gowers writes:
 > ...
 > It is certainly possible. As Sven pointed out, we should probably
 > first address the craziness of using interpolation routines (linear,
 > cubic, lanczos) for downscaling. Do we even need to offer a choice of
 > algorithym for downscaling (Box filter of appropriate size should be
 > ok, except for None, which should be obvious.)? This is tricky because
 > the user can downscale and upscale in one pass (eg. 150% scale on x
 > axis, 80% on the y axis)

In my opinion, here is the best way to handle this:

The driver ("GUI") could catch that there is a "enlarge in one
direction, shrink in the other," first do the enlargement with the
user's selected method (keeping the other dimension fixed), then do
the reduction with box filtering (keeping the other dimension fixed.

It is important to perform the upsampling before the downsampling.



The GUI could have TWO sets of choices:

Upscaling method: None, linear, cubic, lanczos

Downsampling method: None, linear, box (say)

with only one toggle being taken into account when the same type of
operation is applied in both directions (of course).

Nicolas Robidoux
Universite Laurentienne/Laurentian University

Gimp-developer mailing list

Reply via email to