ImageGear v26.3 - Updated November 9, 2022
ImageGear.Core Assembly / ImageGear.Processing Namespace / ImGearProcessing Class / Rotate Method / Rotate(ImGearPage,Double,ImGearRotationModes,ImGearPixel) Method
Image to rotate.
Rotation angle in degrees.
Rotation mode. ImGearRotationModes.CLIP means that the image size is not changed during rotation and the part of picture out of image boundary is cut. ImGearRotationModes.EXPAND changes the image size according to the new picture boundary.
Background color to fill the out of picture area. Can be null (Nothing in VB NET).




Rotate(ImGearPage,Double,ImGearRotationModes,ImGearPixel) Method
Rotates an image.
Syntax
'Declaration
 
Public Overloads Shared Sub Rotate( _
   ByVal page As ImGearPage, _
   ByVal angle As Double, _
   ByVal mode As ImGearRotationModes, _
   ByVal background As ImGearPixel _
) 
 
'Usage
 
Dim page As ImGearPage
Dim angle As Double
Dim mode As ImGearRotationModes
Dim background As ImGearPixel
 
ImGearProcessing.Rotate(page, angle, mode, background)

Parameters

page
Image to rotate.
angle
Rotation angle in degrees.
mode
Rotation mode. ImGearRotationModes.CLIP means that the image size is not changed during rotation and the part of picture out of image boundary is cut. ImGearRotationModes.EXPAND changes the image size according to the new picture boundary.
background
Background color to fill the out of picture area. Can be null (Nothing in VB NET).
Remarks
This method processes all channels of the image as well as image's ROI, if it exists.

Background should be in the same color space as the Page, including Alpha and Extra channels. Background must have the same channel count and bit depth as a DIB?s color space.

Use CanApplyRotate method to check whether the operation can be performed.

Example
See Also