Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Angle Property
See Also  Example
Leadtools.ImageProcessing.Core Namespace > DeskewCommand Class : Angle Property



Amount by which the method rotates the image.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Angle As Integer
Visual Basic (Usage)Copy Code
Dim instance As DeskewCommand
Dim value As Integer
 
value = instance.Angle
C# 
public int Angle {get;}
C++/CLI 
public:
property int Angle {
   int get();
}

Return Value

Amount by which the method rotates the image. The amount of rotation is expressed in hundredths of degrees. For example, 500 means 5 degrees clockwise. Valid values range from -2000 through 2000.

Example

Run the DeskewCommand on an image and straightens it.

Visual BasicCopy Code
Public Sub AnglePropertyExample()
   RasterCodecs.Startup()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

   Dim leadImage As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Clean.tif")

   ' Prepare the command
   Dim command As DeskewCommand
   command = New DeskewCommand
   'Deskew the image.
   command.Flags = DeskewCommandFlags.DeskewImage Or DeskewCommandFlags.FillExposedArea
   command.FillColor = New RasterColor(255, 255, 0)
   command.Run(leadImage)

   MessageBox.Show("The Angle = " & command.Angle.ToString())

   RasterCodecs.Shutdown()
End Sub
C#Copy Code
public void AnglePropertyExample() 

   // Load an image 
   RasterCodecs.Startup(); 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Clean.tif"); 
 
   // Prepare the command 
   DeskewCommand command = new DeskewCommand(); 
   //Deskew the image. 
   command.Flags = DeskewCommandFlags.DeskewImage | DeskewCommandFlags.FillExposedArea; 
   command.FillColor = new RasterColor(255, 255, 0); 
 
   command.Run(image); 
 
   MessageBox.Show("The Angle = " + command.Angle.ToString()); 
 
   RasterCodecs.Shutdown(); 
}

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also