Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
DeskewExtendedCommand Constructor(Int32,Int32,RasterColor,DeskewExtendedCommandFlags)
See Also  Example
Leadtools.ImageProcessing.Core Namespace > DeskewExtendedCommand Class > DeskewExtendedCommand Constructor : DeskewExtendedCommand Constructor(Int32,Int32,RasterColor,DeskewExtendedCommandFlags)



angleResolution
Deskew angle precision. The valid range is from 1 to uAngleRange (maximum deskew angle). The real value is divided by 10.
angleRange
Maximum angle of deskew, in hundredths of degrees. Possible values range from -4500 to 4500. This value is divided internally by 100.
fillColor
RasterColor used to fill the background following rotation. This value is used only if DeskewExtendedCommandFlags.FillExposedArea is set in flags.
flags
Flags that indicate whether to deskew the image, which background color to use, whether to deskew the image if the skew angle is very small, which type of interpolation is to be used, whether the image is mostly text or text and pictures, and whether to use normal or fast rotation.
Initializes a new DeskewExtendedCommand class object with explicit parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal angleResolution As Integer, _
   ByVal angleRange As Integer, _
   ByVal fillColor As RasterColor, _
   ByVal flags As DeskewExtendedCommandFlags _
)
Visual Basic (Usage)Copy Code
Dim angleResolution As Integer
Dim angleRange As Integer
Dim fillColor As RasterColor
Dim flags As DeskewExtendedCommandFlags
 
Dim instance As DeskewExtendedCommand(angleResolution, angleRange, fillColor, flags)
C# 
public DeskewExtendedCommand( 
   int angleResolution,
   int angleRange,
   RasterColor fillColor,
   DeskewExtendedCommandFlags flags
)
C++/CLI 
public:
DeskewExtendedCommand( 
   int angleResolution,
   int angleRange,
   RasterColor fillColor,
   DeskewExtendedCommandFlags flags
)

Parameters

angleResolution
Deskew angle precision. The valid range is from 1 to uAngleRange (maximum deskew angle). The real value is divided by 10.
angleRange
Maximum angle of deskew, in hundredths of degrees. Possible values range from -4500 to 4500. This value is divided internally by 100.
fillColor
RasterColor used to fill the background following rotation. This value is used only if DeskewExtendedCommandFlags.FillExposedArea is set in flags.
flags
Flags that indicate whether to deskew the image, which background color to use, whether to deskew the image if the skew angle is very small, which type of interpolation is to be used, whether the image is mostly text or text and pictures, and whether to use normal or fast rotation.

Example

Run the DeskewExtendedCommand on an image and applies the Deskew Extended filter.

Visual BasicCopy Code
Public Sub DeskewExtendedConstructorExample()
   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 fillColor As New RasterColor(0, 0, 0)
   Dim command As DeskewExtendedCommand = New DeskewExtendedCommand(2, 1000, fillColor, DeskewExtendedCommandFlags.DeskewImage Or DeskewExtendedCommandFlags.DoNotFillExposedArea Or DeskewExtendedCommandFlags.RotateLinear Or DeskewExtendedCommandFlags.DocumentImage)
   command.Run(leadImage)

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

   // 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 
   RasterColor fillColor = new RasterColor(0, 0, 0); 
   DeskewExtendedCommand command = new DeskewExtendedCommand(2, 1000, fillColor, DeskewExtendedCommandFlags.DeskewImage | DeskewExtendedCommandFlags.DoNotFillExposedArea | DeskewExtendedCommandFlags.RotateLinear | DeskewExtendedCommandFlags.DocumentImage); 
   command.Run(image); 
 
   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