GdPicture.NET Reference Guide
GetSkewAngle(Int32) Method
Example 





GdPicture14 Namespace > GdPictureImaging Class > GetSkewAngle Method : GetSkewAngle(Int32) Method
GdPicture Image Identifier.
Determines the skew angle of an image in degrees.
Syntax
'Declaration
 
Public Overloads Function GetSkewAngle( _
   ByVal ImageID As Integer _
) As Single
public float GetSkewAngle( 
   int ImageID
)
public function GetSkewAngle( 
    ImageID: Integer
): Single; 
public function GetSkewAngle( 
   ImageID : int
) : float;
public: float GetSkewAngle( 
   int ImageID
) 
public:
float GetSkewAngle( 
   int ImageID
) 

Parameters

ImageID
GdPicture Image Identifier.

Return Value

Image skew in degrees.
Remarks
Use the GetStat() method to determine if this method has succeeded.
Example
Obtaining the skew angle.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim Angle As Single = oGdPictureImaging.GetSkewAngle(ImageID)
   oGdPictureImaging.RotateAnglePreserveDimensionsCenterBackColor(ImageID, -Angle, Color.White)
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
Overload List
AutoDeskew(Int32) Method
GetStat Method