GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / RemoveBlob Method / RemoveBlob(Int32,Int32,Int32,Int32,Int32,BlobRemoveMode) Method
GdPicture image identifier. Only 1 bit per pixel images with black and white palette are supported.
Minimum Width of Blob considered for removal.
Minimum Height of Blob considered for removal.
Maximum Width of Blob considered for removal.
Maximum Height of Blob considered for removal.
Can be any value, not used internally starting V11.
Example





In This Topic
RemoveBlob(Int32,Int32,Int32,Int32,Int32,BlobRemoveMode) Method
In This Topic
Removes blobs and ink blobs with a specified size margin.
Syntax
'Declaration
 
Public Overloads Function RemoveBlob( _
   ByVal ImageID As Integer, _
   ByVal MinBlobWidth As Integer, _
   ByVal MinBlobHeight As Integer, _
   ByVal MaxBlobWidth As Integer, _
   ByVal MaxBlobHeight As Integer, _
   ByVal Mode As BlobRemoveMode _
) As GdPictureStatus
public function RemoveBlob( 
    ImageID: Integer;
    MinBlobWidth: Integer;
    MinBlobHeight: Integer;
    MaxBlobWidth: Integer;
    MaxBlobHeight: Integer;
    Mode: BlobRemoveMode
): GdPictureStatus; 
public function RemoveBlob( 
   ImageID : int,
   MinBlobWidth : int,
   MinBlobHeight : int,
   MaxBlobWidth : int,
   MaxBlobHeight : int,
   Mode : BlobRemoveMode
) : GdPictureStatus;

Parameters

ImageID
GdPicture image identifier. Only 1 bit per pixel images with black and white palette are supported.
MinBlobWidth
Minimum Width of Blob considered for removal.
MinBlobHeight
Minimum Height of Blob considered for removal.
MaxBlobWidth
Maximum Width of Blob considered for removal.
MaxBlobHeight
Maximum Height of Blob considered for removal.
Mode
Can be any value, not used internally starting V11.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

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

This method will remove blobs with black pixels being at least 60% of the bounding rectangle of the blob.

Example
Removing blobs from a tiff and saving as a png.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.tif", false);
 
    int minBlobWidth = 50;
    int minBlobHeight = 50;
    int maxBlobWidth = 1000;
    int maxBlobHeight = 1000;
 
    gdpictureImaging.RemoveBlob(imageID, minBlobWidth, minBlobHeight, maxBlobWidth, maxBlobHeight, BlobRemoveMode.FavorQuality);
    gdpictureImaging.SaveAsPNG(imageID, "image.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also