Description The GetLargestWhiteRectangle method searches for the largest empty (white) rectangle fitting to the specified parameters on an image. This method works for only monochrome, 8 bit per pixel and 24 bit per pixel images. In case of non binary images the binarized version of the original image is used with a simple optimal thresholding. LeftTopX is a value that shows Left Top X coordinate of area found. The LeftTopX value can be retrieved by the method GetLeftTopX(). LeftTopY is a value that shows Left Top Y coordinate of area found. The LeftTopY value can be retrieved by the method GetLeftTopY(). RightBottomX is a value that shows Right Bottom X coordinate of area found. The RightBottomX value can be retrieved by the method GetRightBottomX(). RightBottomY is a value that shows Right Bottom Y coordinate of area found. The RightBottomY value can be retrieved by the method GetRightBottomY().
Syntax RetVal = [BiBrw1Dh]GetLargestWhiteRectangle hDIB iMinA iMinB nOrientation
Returns RetVal Short 0 on success or an error code on failure. For possible values see Barcode Error codes.
Remarks hDib LONGLONG Device independent bitmap.
iMinA Short The minimal horizontal size of the rectangle to find. Can be specified as zero.
iMinB Short The minimal vertical size of the rectangle to find. Can be specified as zero.
nOrientation Short This parameter specifies the orientation of the rectangle to find. Available values:
RECT_NONE(0) – The orientation of the rectangle can be both landscape or portrait.
RECT_LANDSCAPE(1) Landscape orientation.
RECT_PORTRAIT(2) Portrait orientation.
See Also GetLeftTopX, GetLeftTopY, GetRightBottomX, GetRightBottomY