ImageEn, unit iexHelperFunctions




function IEResampleImageFile(const sInFilename, sOutFilename: string;
                             iJpegQuality: Integer;
                             iMaxX: Integer;
                             iMaxY: Integer;
                             bCanStretch: Boolean = False;
                             QualityFilter: TResampleFilter = rfLanczos3;
                             bAutoAdjustOrientation: Boolean = False;
                             bStripMetaData: Boolean = False
                             ): Boolean;


Loads an image of any format, resizes it and saves it to file (of any format).

Parameter Description
iJPEGQuality Specify the JPEG_Quality if sOutFilename is a JPEG
iMaxX, iMaxY The maximum size of the new image (as the aspect ratio is maintained, one of the dimensions is likely to be less than the specified value)
bCanStretch Set to false to avoid images smaller than iMaxX x iMaxY from being made larger
QualityFilter Specify the quality that is used for rescaling the image
bAutoAdjustOrientation Sets EnableAdjustOrientation to automatically re-orient JPEG camera images
bStripMetaData If enabled ResetInfo is used to strip meta-data from the image and make it smaller


// Resize MyImage.jpeg to the screen dimensions and save to MyImage_Screen.jpeg
IEResampleImageFile('D:\MyImage.jpeg', 'D:\MyImage_Screen.jpeg', 90, Screen.Width, Screen.Height, False);