ImageEn, unit iexHelperFunctions

IERotateImageFile

IERotateImageFile


Declaration


function IERotateImageFile(const sFilename : string;
                           iJpegQuality : integer;
                           iRotateAngle : integer;
                           AntiAliasMode: TIEAntialiasMode = ierFast;
                           bCanUseLossless: Boolean = true;
                           cBackgroundColor: TColor = clWhite): Boolean; overload;
function IERotateImageFile(const sInFilename, sOutFilename : string;
                           iJpegQuality : integer;
                           iRotateAngle : integer;
                           AntiAliasMode: TIEAntialiasMode = ierFast;
                           bCanUseLossless: Boolean = true;
                           cBackgroundColor: TColor = clWhite): Boolean; overload;


Description


Calls Rotate to rotate an image file and resave it (optionally to an alternative file). if bCanUseLossless is specified then JpegLosslessTransform2 is used where possible for JPEG files.

See also: AngleToImageEnRotateAngle


Example


// This will result in a lossless rotation
IERotateImageFile('D:\MyImage.jpg', 90, ierFast, True);
                                                                
// This will be a lossy rotation
IERotateImageFile('D:\MyImage.jpg', 45, ierFast, True, clBlack);