#include "BIDIB.H"
int CALLBACK IsImageBlank( HDIB hDib,
int nRatio,
RGBLIMIT sBlankLimit)
Description
This function searchs the specified device independent bitmap based on the ratio of black and white pixels on the page. This function works for only 1, 8 and 24 bit per pixel images.
Parameters
|
HDIB |
hDib |
Window handle of the image. |
|
int |
nRatio |
The ratio of black and white pixels on the page in 0.1 percent units. For example 100 is 10 percent ratio black pixels on the white background. Boundary values are 0 to 1000 inclusive. |
|
RGBLIMIT |
sBlankLimit |
This parameter is noticed for only 8, 24 bit per pixel images. The structure contains the RGB limit components for blank page detecting. For example if lRed = 240, lGreen = 240, lBlue = 240 and the RGB components value of current pixel of the image are greater than 240 then the pixel is a blank pixel. |
Return values
-1 - on error
0 - if image is not blank
1 - if image is blank
Requirements
Header : Declared in BiDIB.h; include BiDIB.h.
Library : Use BiDIB.lib.
DLLs : BiDIB.dll.
Code example