ImageGear for .NET
Rotate(ImGearPage,Double,ImGearRotationModes,ImGearPixel) Method
See Also  Example Send Feedback
ImageGear21.Core Assembly > ImageGear.Processing Namespace > ImGearProcessing Class > Rotate Method : Rotate(ImGearPage,Double,ImGearRotationModes,ImGearPixel) Method




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).

Glossary Item Box

Rotates an image.

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

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

C#Copy Code
// Find the skew angle of an image.
double angle = ImGearRasterProcessing.FindSkewAngle(igRasterPage);

// Rotate image by the found skew angle.
ImGearProcessing.Rotate(igRasterPage, angle, ImGearRotationModes.CLIP, null);
Visual BasicCopy Code
' Find the skew angle of an image.
Dim angle As Double = ImGearRasterProcessing.FindSkewAngle(igRasterPage)

' Rotate image by the found skew angle.
ImGearProcessing.Rotate(igRasterPage, angle, ImGearRotationModes.CLIP, Nothing)

See Also

©2013. Accusoft Corporation. All Rights Reserved.