Rotates the image by the specified angle and crops the borders of the original bitmap. It is useful to deskew an image if you know the rotation angle.

Namespace: HiComponents.IEvolution
Assembly: IEvolution2 (in IEvolution2.dll) Version: 10.1.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
public void RotateAndCrop(
	double angle,
	AntialiasMode antialiasMode,
	double rate,
	CropAlgorithm cropAlgorithm
)
Public Sub RotateAndCrop ( _
	angle As Double, _
	antialiasMode As AntialiasMode, _
	rate As Double, _
	cropAlgorithm As CropAlgorithm _
)
public:
void RotateAndCrop(
	double angle, 
	AntialiasMode antialiasMode, 
	double rate, 
	CropAlgorithm cropAlgorithm
)

Parameters

angle
Double
Rotation angle. Must be in the range -180 and +180 degrees (specified as counter-clockwise, i.e. RotateAndCrop(45) means rotated 45° left).
antialiasMode
AntialiasMode
Specifies the anti-aliasing algorithm that is used to improve rotation quality.
rate
Double
Specifies the approximate quotient of resulting image width and height. For example a landscape image would typically be 1.3, whereas a portrait image would be 0.75. This value is only needed when Angle is +/-45 or +/-135 and CropAlgorithm is SkewedDocument.
cropAlgorithm
CropAlgorithm
Generally both cropping algorithms will give similar results, but specifying an appropriate algorithm can improve results at higher rotation levels.

See Also