VintaSoft Imaging .NET SDK v8.5
GetRotationAngleCommand Class
Members  Example 



Vintasoft.Imaging.ImageProcessing.Info Namespace : GetRotationAngleCommand Class
Detects rotation angle of an textual image.
Object Model
GetRotationAngleCommand ClassProcessingCommandResults ClassProcessingCommandResult Class
Syntax
'Declaration
 
Public Class GetRotationAngleCommand 
   Inherits Vintasoft.Imaging.ImageProcessing.ProcessingCommandBase
public class GetRotationAngleCommand : Vintasoft.Imaging.ImageProcessing.ProcessingCommandBase 
public __gc class GetRotationAngleCommand : public Vintasoft.Imaging.ImageProcessing.ProcessingCommandBase 
public ref class GetRotationAngleCommand : public Vintasoft.Imaging.ImageProcessing.ProcessingCommandBase 
Example
This example shows how to load an image from disk and detect the rotation angle of the image.
Imports System.Windows.Forms
            
Imports Vintasoft.Imaging
Imports Vintasoft.Imaging.ImageProcessing.Info
Imports Vintasoft.Imaging.ImageProcessing
            
Class GetRotationAngleCommandExample
    Public Sub ProcessImage()
        ' [ do not forget to set your image file path here! ]
        ' open an existing image
        Dim image As New VintasoftImage("Deskew.tif")
            
        ' create the command
        Dim command As New GetRotationAngleCommand()
            
        Try
            ' execute the command
            command.ExecuteInPlace(image)
        Catch ex As ImageProcessingException
            ' show error message if problem occured
            MessageBox.Show(ex.Message)
            Return
        End Try
            
        ' show result
        MessageBox.Show(String.Format("Rotation angle is {0} degree.", command.Angle.ToString("f2")))
    End Sub
End Class
using System.Windows.Forms;
            
using Vintasoft.Imaging;
using Vintasoft.Imaging.ImageProcessing.Info;
using Vintasoft.Imaging.ImageProcessing;
            
class GetRotationAngleCommandExample
{
    public void ProcessImage()
    {
        // [ do not forget to set your image file path here! ]
        // open an existing image
        VintasoftImage image = new VintasoftImage("Deskew.tif");
            
        // create the command
        GetRotationAngleCommand command = new GetRotationAngleCommand();
            
        try
        {
            // execute the command
            command.ExecuteInPlace(image);
        }
        catch (ImageProcessingException ex)
        {
            // show error message if problem occured
            MessageBox.Show(ex.Message);
            return;
        }
            
        // show result
        MessageBox.Show(string.Format("Rotation angle is {0} degree.", command.Angle.ToString("f2")));
    }
}
Inheritance Hierarchy

System.Object
   Vintasoft.Imaging.ImageProcessing.ProcessingCommandBase
      Vintasoft.Imaging.ImageProcessing.Info.GetRotationAngleCommand

Requirements

Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

See Also

Reference

GetRotationAngleCommand Members
Vintasoft.Imaging.ImageProcessing.Info Namespace