←Select platform

MaximumHoleHeight Property

Summary
Gets or sets the maximum height of one of the holes of the hole punch configuration to be removed.
Syntax
C#
C++/CLI
Java
Python
public int MaximumHoleHeight { get; set; } 
public int getMaximumHoleHeight(); 
public void setMaximumHoleHeight( 
   int intValue 
); 
public: 
property int MaximumHoleHeight { 
   int get(); 
   void set (    int ); 
} 
MaximumHoleHeight # get and set (HolePunchRemoveCommand) 

Property Value

The maximum height of one of the holes of the hole punch configuration to be removed. If HolePunchRemoveCommandFlags.UseDpi is set in the Flags property, units are in thousandths of an inch, otherwise units are in pixels. This property is valid only if HolePunchRemoveCommandFlags.UseSize is set in the Flags property.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
public void ImageRegionPropertyExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Clean.tif")); 
 
   // Prepare the command 
   HolePunchRemoveCommand command = new HolePunchRemoveCommand(); 
   command.HolePunchRemove += new EventHandler<HolePunchRemoveCommandEventArgs>(HolePunchRemoveEvent_S3); 
   command.Flags = HolePunchRemoveCommandFlags.UseDpi | HolePunchRemoveCommandFlags.UseSize | HolePunchRemoveCommandFlags.UseLocation | HolePunchRemoveCommandFlags.SingleRegion | HolePunchRemoveCommandFlags.LeadRegion; 
   command.Location = HolePunchRemoveCommandLocation.Left; 
   command.MaximumHoleHeight = image.Height; 
   command.MaximumHoleWidth = image.Width; 
   command.MinimumHoleHeight = 0; 
   command.MinimumHoleWidth = 0; 
   command.Run(image); 
 
} 
 
private void HolePunchRemoveEvent_S3(object sender, HolePunchRemoveCommandEventArgs e) 
{ 
   MessageBox.Show("Size " + "( " + e.BoundingRectangle.Left + ", " + e.BoundingRectangle.Top + ") - " + "( " + e.BoundingRectangle.Right + ", " + e.BoundingRectangle.Bottom + ")" + 
      "\n Hole Index " + e.HoleIndex.ToString() + 
      "\n Holes Total Count " + e.HoleTotalCount.ToString() + 
      "\n Black Count " + e.BlackCount.ToString() + 
      "\n White Count " + e.WhiteCount.ToString()); 
   e.Status = RemoveStatus.Remove; 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.11.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.