Description |
Finds the margins on a page based on the pixel values and returns the width or height of each margin. |
||
Syntax |
RetVal = [BIDIB.] GetDIBMargins hDib, byGrayThreshold, bMarginIsBlack, pLeftMargin, pRightMargin, pTopMargin, pBottomMargin |
||
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. |
|
pLeftMargin |
Integer |
Output value. Returns the width of the left margin in pixels. |
|
pRightMargin |
Integer |
Output value. Returns the width of the right margin in pixels. |
|
pTopMargin |
Integer |
Output value. Returns the height of the top margin in pixels. |
|
pBottomMargin |
Integer |
Output value. Returns the height of the bottom margin in pixels. |
Return Value |
True on success, otherwise False. Use the BitmaniError method to get the error code. |