This method rotates a raster image. For 32 bit images containing an alph channel, use this method.

[Visual Basic]Public Function Rotate(angle As Integer, xTurn As Boolean, yTurn As Boolean, mode As Boolean, alpha As Byte, red As Byte, green As Byte, blue As Byte, clip As Boolean) As Boolean
[C#]public bool Rotate(int angle, bool xTurn, bool yTurn, bool mode, byte alpha, byte red, byte green, byte blue, bool clip);

Parameters

angle
   Angle of rotation (-35999 to 35999, in 1/100 degree units)

xTurn
   Reverses image along the x axis (False: no reversal, True: reversal)

yTurn
   Reverses image along the y axis (False: no reversal, True: reversal)

mode
   Sets whether on not linear interpolation is used (False: does not interpolate, True: interpolates) 
   Interpolation is enabled for 8 bit grayscale, 16, 24, and 32 bit images only

alpha
   The alpha component of the background color of a 32 bit image (from 0 to 255)

red
   The red component of the background color (from 0 to 255)

green
   The green component of the background color (from 0 to 255)

blue
   The blue component of the background color (from 0 to 255)

clip
   Sets whether or not the image is clipped (False: no clipping, True: clipping)

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

This Rotate method rotates a raster image. If the image is a 32 bit image with a valid alpha channel, use this method. If the Angle parameter value is positive, the image is rotated counterclockwise, if the Angle parameter value is negative, the image is rotated clockwise. When the Clip parameter is True and the rotated image is larger than the original, the excess areas are cut.

To execute the Rotate method, set the image handle of the image in the Image property or the Layer(LayerNumber).Image property. The Rotate method supports 1, 4, 8, 16, 24, and 32 bit images.

If the Rotate method is successful and the DestinationAsImageKitImage property is True, the resulting image will be set in the Image property or in the Layer(LayerNumber).Image property, according to the value set in the LayerNumber property.

If the Rotate method is successful and the DestinationAsImageKitImage property is False, the resulting image will be set in the DestinationImage property.

If the original image is a 32 bit image, then the result will be a 32 bit image. All other bitcounts will result in a 24 bit color image. Please use the ConvertColor method to change the image to the appropriate bitcount.

See Also

ImageKit.Effect Members | Newtone.ImageKit.WPF.ImageKit

The ImageKit WPF is created by Newtone Corporation