GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / RemoveLines Method / RemoveLines(Int32,LineRemoveOrientation) Method
GdPicture image identifier. Only 1 bit per pixel images with black and white palette are supported.
A member of LineRemoveOrientation enumeration specifying whether to remove horizontal or vertical lines.
Example





In This Topic
RemoveLines(Int32,LineRemoveOrientation) Method
In This Topic
Performs line removal on a GdPicture image or on an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Overloads Function RemoveLines( _
   ByVal ImageID As Integer, _
   ByVal Orientation As LineRemoveOrientation _
) As GdPictureStatus
public function RemoveLines( 
    ImageID: Integer;
    Orientation: LineRemoveOrientation
): GdPictureStatus; 
public function RemoveLines( 
   ImageID : int,
   Orientation : LineRemoveOrientation
) : GdPictureStatus;

Parameters

ImageID
GdPicture image identifier. Only 1 bit per pixel images with black and white palette are supported.
Orientation
A member of LineRemoveOrientation enumeration specifying whether to remove horizontal or vertical lines.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

You can use the method to remove both vertical and horizontal lines at the same time by using a bitwise OR between LineRemoveOrientation.Horizontal and LineRemoveOrientation.Vertical

This method is used in the "Document Clean Up" Demo.

This method requires the Image Documents component to run.

Example
Removing lines from a black and white tiff image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    // LoadInMemory parameter is set to true in order to be able to update the input file.
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.tif", true);
 
    // Remove vertical and horizontal lines using default parameters.
    gdpictureImaging.RemoveLines(imageID, LineRemoveOrientation.Horizontal | LineRemoveOrientation.Vertical);
    gdpictureImaging.SaveAsTIFF(imageID, "image.tif", TiffCompression.TiffCompressionCCITT4);
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also