Declaration
procedure Rotate(idx: integer; Angle: double; AntialiasMode: TIEAntialiasMode = ierFast; BackgroundColor: TColor = clWhite);
Description
Rotates a frame of the current image by the specified angle (negative or positive degrees counter-clockwise).
AntialiasMode specifies the anti-aliasing algorithm that is used to improve rotation quality (only used when angle is NOT 90, 180 or 270):
Value | Description |
ierNone | No anti-aliasing (lowest quality) |
ierFast | Fast, but lower quality |
ierBilinear | Bilinear, high quality |
ierBicubic | Bicubic, highest quality |
BackgroundColor specifies a background color to fill new regions (i.e. when not rotating at a 90 degree angle)
Anti-alias Modes
// Rotate the first frame of a TIFF file 90° counter-clockwise;
MBitmap := TIEMultiBitmap.Create();
MBitmap.LoadFromFile( 'D:\Doc.Tiff' );
MBitmap.Rotate( 0, 90 );
MBitmap.SaveToFile( 'D:\Doc.Tiff' );
MBitmap.Free;
// Rotate the first frame of an image 45° clockwise at highest quality with a white background color
MBitmap.Rotate( 0, 315, ierBicubic, clWhite );
See Also
◼AngleToImageEnRotateAngle