| ImageEn, unit iexHelperFunctions |
|
IERotateImageFile
IERotateImageFile
Declaration
function IERotateImageFile(const FileName: string;
JpegQuality: Integer;
RotateAngle: Integer;
AntiAliasMode: TIEAntialiasMode = ierFast;
bCanUseLossless: Boolean = True;
cBackgroundColor: TColor = clWhite): Boolean; overload;
function IERotateImageFile(const InFileName, OutFileName: string;
JpegQuality: Integer;
RotateAngle: 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.
Note:
◼You must add the iexHelperFunctions unit to your uses clause
◼Consider use of
AngleToImageEnRotateAngle
◼Delphi/C++ 2005 or newer is required
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);
See Also
◼AngleToImageEnRotateAngle