Description |
Finds and cuts of the margins on a page based on the pixel values. |
||
Syntax |
RetVal = [BIDIB.] CropDIBMargins hDib, byGrayThreshold, bMarginIsBlack |
||
Parameters |
hDib |
LONGLONG |
Handle to the image. |
|
byGrayThreshold |
Integer |
The grayscale level that defines what is considered page content. If bMarginIsBlack is set to FALSE, any pixel that is darker than or equal to byGrayThreshold is considered to be page content inside the margins. If bMarginIsBlack is set to TRUE, any pixel that is lighter than byGrayThreshold is considered to be page content inside the margins. The value of 0 means black, 255 means white. |
|
bMarginIsBlack |
Boolean |
Set to TRUE if the page content is lighter than the page, otherwise set to FALSE. |
Return Value |
On success, returns a handle to the new DIB. The old DIB is not freed. On error, returns NULL. Use the BitmaniError function to get the error code. |