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



Number of pixels to exclude from the Right of the image

Syntax

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

Return Value

Number of pixels to exclude from the Right of the image. Possible values range from 0 to the image's width, in pixels.

Example

Run the BlankPageDetectorCommand on an image and determine whether it is blank.

Visual BasicCopy Code
Public Sub BlankPageDetectorCommandExample()
   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 BlankPageDetectorCommand = New BlankPageDetectorCommand
     'Determine whether the image is blank.
   command.Flags = BlankPageDetectorCommandFlags.DetectNoisyPage

   command.Run(leadImage)
   MessageBox.Show(" Is Blank : " & command.IsBlank & "\n Accuracy : " & (command.Accuracy * 1.0 / 100) & "%", "Blank Page Detection Results")


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

   // 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 
   BlankPageDetectorCommand command = new BlankPageDetectorCommand(); 
   //Determine whether the image is a blank page 
   command.Flags = BlankPageDetectorCommandFlags.DetectNoisyPage; 
   command.Run(image); 
 
   MessageBox.Show(" Is Blank   : " + command.IsBlank + "\n Accuracy : " + (command.Accuracy * 1.0 / 100) + "%", "Blank Page Detection Results"); 
 
   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