ImageEn, unit iexDBBitmaps

TIEDBMultiBitmap.Resample

TIEDBMultiBitmap.Resample


Declaration

procedure Resample(idx: integer; NewWidth, NewHeight: integer; FilterType: TResampleFilter = rfNone; MaintainAspectRatio: Boolean = False; ShrinkOnly: Boolean = False); overload;
procedure Resample(idx: integer; ScaleBy: Double; FilterType: TResampleFilter = rfNone); overload;


Description

Resizes a frame of the current image and updates the database. The content of the image changes (stretched to new size).

Overload 1
Parameter Description
idx The frame to resample
NewWidth, NewHeight New dimensions of the image
FilterType Resampling interpolation algorithm (quality)
MaintainAspectRatio Automatically reduces NewWidth or NewHeight to ensure the original proportions of the image are maintained
ShrinkOnly If true and the new dimensions would enlarge the image, the resampling as skipped

Overload 2
Parameter Description
idx The frame to resample
ScaleBy The amount to scale the image. E.g. 0.5 would halve the size of all images while respecting the proportions
FilterType Resampling interpolation algorithm (quality)

Note: If Mode = dmRecordFrames, this method only resamples a frame of the current image and does NOT update the database. You will need to call UpdateDatabaseImage


Examples

// Halve the size of the first image in a TImageEnMView attached to a TIEDBMultiBitmap
fDBMBitmap.Resample( 0, 0.5, rfLanczos3 );