Øyvind Kolås wrote:
> On 8/9/07, Graeme Gill <[EMAIL PROTECTED]> wrote:
>> Øyvind Kolås wrote:
>>> This code implements a perfect box filter for this case, what needs to
>>> be added on top
>>> of this to be able to do good estimate (maybe even exact) box filter
>>> resamplings is trilinear interpolation by doing bilinear interpolation
>>> on the two closest 50% 25% 12.5% .. levels of
>>> the scaled pyramid.
>> I'd suggest having a read of Graphics Gems I, page 147,
>> "Filters For Common Resampling Tasks" by Ken Turkowski.
>> Box and tent filters are easy to implement, but not necessarily
>> the best choices...
> For downscaling (decimating) box filtering is orders of magnitude
> better than the buggy erronious use of interpolation that currently is
> used in GIMP. More theoretically correct
> resampling methods like a Sinc filter with an infinite neighbourhood
> definitly is not something one would want in the view code. I also
> doubt you will see much of a difference when doing things like
> generating thumbnails etc. My gut feeling is that high quality
> resampling matters
> a lot more for other transformations than downscaling.
> /Øyvind K.
I get the feeling that we are mixing 2 things here.
1. scaling for display purposes (uniform X and Y scaling)
2. scaling as a effective drawing transformation. (X and Y scale can be
The tile-pyramid as it is now seems to me only usefull for the 1ste case.
If the downscaling is rewritten (completed) then it should be for display.
1. Calculate the image pyramid.
[filter] -> [:2] -> [filter] -> [:2] -> [filter] -> [:2]
2. Linear interpolate between level and level-1
I leave in the middle if the [filter] is a box, gauss or sinc filter.
For the downscaling as a effective drawing transformation, the pyramid
can only be used
for reducing to the maximum X and Y scale in 2D.
What afterwarts only, in 1D for the smaler scale?
scale X = 0.15
scale X = 0.30
[filter] -> [:2] (2D X and Y)
[filter] -> [:2] (1D X)
Gimp-developer mailing list