GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / RemoveHolePunch Method / RemoveHolePunch(Int32) Method
GdPicture image identifier.

Be aware that only 1, 8 and 24 bit per pixel images are supported.

Example





In This Topic
RemoveHolePunch(Int32) Method
In This Topic
Removes all punch holes of the image. This method allows you to remove both circle and rectangle punch holes, as well as the punch holes that looks like a part of the circle (residuals of holes). The image you want to process can be black and white, grayscale and colored as well.
Syntax
'Declaration
 
Public Overloads Function RemoveHolePunch( _
   ByVal ImageID As Integer _
) As GdPictureStatus
public GdPictureStatus RemoveHolePunch( 
   int ImageID
)
public function RemoveHolePunch( 
    ImageID: Integer
): GdPictureStatus; 
public function RemoveHolePunch( 
   ImageID : int
) : GdPictureStatus;
public: GdPictureStatus RemoveHolePunch( 
   int ImageID
) 
public:
GdPictureStatus RemoveHolePunch( 
   int ImageID
) 

Parameters

ImageID
GdPicture image identifier.

Be aware that only 1, 8 and 24 bit per pixel images are supported.

Return Value

A member of the GdPictureStatus enumeration.

If the method has been successfully followed, then the return value is GdPictureStatus.OK. We strongly recommend always checking this status first.

Remarks
This method is used in the "Image Processing Sample" and the "Document Clean Up Sample", both are C# demo applications. Please read the sections "Learning GdPicture.NET" and "Programming" in the GdPicture reference guide for further information on this feature.

This method requires the Image Documents component to run.

Example
Removes punch holes from a bitonal tiff image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("bitonal.tif", false);
    gdpictureImaging.RemoveHolePunch(imageID);
    gdpictureImaging.SaveAsTIFF(imageID, "processed_image.tif", TiffCompression.TiffCompressionCCITT4);
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also