procedure BoxDownSampling(Image: TImage32; newWidth, newHeight: Integer);
Image downsampling occurs when images are reduced in size. When downsampling, this function generally produces much clearer images than general purpose resamplers (which are much better at upsampling, and doing other affine transformations). Because of that, this function will be used automatically whenever downsampling unless the USE_DOWNSAMPLER_AUTOMATICALLY compiler directive has been disabled (see img32.inc).
uses Img32, Img32.Fmt.PNG; ... var img: TImage32; begin img := TImage32.Create; try img.LoadFromFile('TextOnPath.png'); // the specified resampler will be // ignored when downsampling unless // directed otherwise in img32.inc. //img.Resampler := rBicubicResampler; img.Scale(0.1); img.SaveToFile('TextOnPath_small.png') finally img.free; end; end;
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 17 Jan 2025