GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / IsBlank Method / IsBlank(Int32) Method
GdPicture image identifier.
Example





In This Topic
IsBlank(Int32) Method
In This Topic
Detects if a GdPicture image or on an area of a GdPicture image defined by SetROI() method is blank.
Syntax
'Declaration
 
Public Overloads Function IsBlank( _
   ByVal ImageID As Integer _
) As Boolean
public bool IsBlank( 
   int ImageID
)
public function IsBlank( 
    ImageID: Integer
): Boolean; 
public function IsBlank( 
   ImageID : int
) : boolean;
public: bool IsBlank( 
   int ImageID
) 
public:
bool IsBlank( 
   int ImageID
) 

Parameters

ImageID
GdPicture image identifier.

Return Value

True if it is a blank image, else False.
Remarks
Use the GetStat() method to check if this method has completed successfully.
Example
Removing the blank pages from a tiff document.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    // LoadInMemory parameter is set to true in order to be able to update the input file.
    int imageID = gdpictureImaging.TiffCreateMultiPageFromFile("multipage.tif", true);
    int pageCount = gdpictureImaging.TiffGetPageCount(imageID);
    int pageNo = 1;
    while (pageNo <= pageCount)
    {
        gdpictureImaging.TiffSelectPage(imageID, pageNo);
        if (gdpictureImaging.IsBlank(imageID))
        {
            gdpictureImaging.TiffDeletePage(imageID, pageNo);
            pageCount--;
        }
        else
        {
            pageNo++;
        }
    }
    gdpictureImaging.TiffSaveMultiPageToFile(imageID, "multipage.tif", TiffCompression.TiffCompressionAUTO);
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also