IsImageBlack  Method

Description         This method searches the specified device independent bitmap based on the ratio of black and white pixels on the page. This method works for only 1, 8, and 24 bit per pixel images.

Syntax                 RetVal = [BIDIB.]IsImageBlack Dib nRatio sRed sGreen sBlue

Returns               RetVal                    Long                1 if the image is black. 0 if the image is not black. -1 if an error occurs.

Remarks             Dib                          LONGLONG The handle of a device independent bitmap.

                            nRatio                    Long                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.

                            sRed                       Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the red RGB component for black page detecting.

                            sGreen                    Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the green RGB component for black page detecting.

                            sBlue                       Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the blue RGB component for black page detecting.

 

                            For example if sRed = 240, sGreen = 240, sBlue = 240 and the RGB components values of the current pixel of the image are less than 240 then the pixel is a black pixel.

See Also              FindBlackPage Method