#include "BIDIB.H"
int CALLBACK IsImageBlack( 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 black page detecting. For example if lRed = 240, lGreen = 240, lBlue = 240 and the RGB components value of current pixel of the image are less than 240 then the pixel is a black pixel. |
Return values
-1 - on error
0 - if image is not black
1 - if image is black
Requirements
Header : Declared in BiDIB.h; include BiDIB.h.
Library : Use BiDIB.lib.
DLLs : BiDIB.dll.