Img32.Resamplers

Resampling is used whenever an image's geometry (size or shape) is changed, whether by scaling, rotating, skewing or any other transformation. There are multiple resampling functions because each has its strengths and weaknesses.

The library supplies four resampling functions which can be selected using a unique numeric identifier:

Additional resamplers can be added using the RegisterResampler function. (The resampling function's unique identifier will be assigned when it's registered.)

When a TImage32 object is created, it's assigned the DefaultResampler (rBilinearResampler), which will be used if or when the image's geometry is changed. The TImage32's resampling function can easily be changed through its Resampler property.

From resampling example ...

starting with this image


scaling and rotating produces

rNearestResampler
Fast but also pixelated
0.98 msec
rBilinearResampler
Moderately blurred
5.01 msec
rWeightedBilinear
Mildly pixelated and mildly blurred
5.38 msec
rBicubicResampler
Clearest image but slowest
15.5 msec

Contents

Routines
BoxDownSampling

See Also

TImage32, TImage32.Resampler, RegisterResampler