ImageGear Professional for Windows ActiveX
RotateEx Method

Description:

Rotates an image about its center through the angle indicated by Angle. (Angle must be expressed in degrees, such as 45.0 to rotate 45 degrees.) RotateMode is examined to determined whether to clip the image or resize the bitmap. Set the IGProcessingCtl Control.BackColor Property to the color that you would like to display in the background that was previously covered by the image before it was rotated. The Interpolation parameter controls what type of interpolation, if any, is used for rotation.

This method processes all image channels, including Alpha channel and Extra channels, if they exist.

For highest quality, bilinear interpolation is recommended, especially if the rotation angle is small (less than 5 degrees) and/or the image will be rotated multiple times (not recommended). Bicubic interpolation can be used to achieve a slightly sharper appearance.

Syntax:

      RotateEx (ByVal pPage As IGPage, ByVal Angle As Double, ByVal 
RotationMode As enumIGRotationModes, ByVal Interpolation As 
enumIGInterpolations) 

Parameters:

Name Description
pPage Reference to IGPage Object.
Angle Set to a positive or negative value for angle of rotation.
RotationMode The value can be either:
  • IG_ROTATE_CLIP - clip the rotated image to keep the image bitmap the same size or
  • IG_ROTATE_EXPAND - expand the size of the bitmap if necessary to retain the entire rotated image.
Interpolation The value can be:
  • IG_INTERPOLATION_NONE - don't use interpolation
  • IG_INTERPOLATION_BILINEAR - use bilinear interpolation
  • IG_INTERPOLATION_BICUBIC - use bicubic interpolation

Return Value:

N/A

Bits Per Pixel:

1, 4, 8, 9-16-bit gray level, 24, 32

Sample:

Image Processing and Effects

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback