Description This method searches the specified "szTiffFileName" single page or multi-page TIFF file for black pages based on the ratio of black and white pixels on the page. If it finds a black page the function will return the offset in 1 base numbering. This method works for only 1, 8, and 24 bit per pixel images.
Syntax RetVal = [BITIFF.]FindBlackPage szTiffFileName nRatio iPage sRed sGreen sBlue
Returns RetVal Short >0: The 1 based offset of the page in the TIFF file.
-1: On error.
0: There is no black page in the TIFF file.
Remarks szTiffFileName Long The TIFF file path name.
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.
iPage Short Zero based page number. The function starts searching from this page in the image file. This value must be 0 and number of pages in the image file - 1.
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 IsImageBlack Method