The BORDERREMOVE structure provides border removal information.
Size of this structure in bytes, for versioning. Use the sizeof() operator to calculate this value.
Flags that determine the behavior of the border removal process. Flags may be combined using a bitwise OR ( | ). Possible values are:
|BORDER_SINGLE_REGION||For each border encountered by L_BorderRemoveBitmap, if the BORDERREMOVECALLBACK function returns SUCCESS_REMOVE, the removed border is added to an internal single region. If the callback returns SUCCESS_NOREMOVE, the border is not added to the single region. When L_BorderRemoveBitmap returns, either
|BORDER_LEAD_REGION||When L_BorderRemoveBitmap returns,
|BORDER_IMAGE_UNCHANGED||The original image is unchanged.|
|BORDER_CALLBACK_REGION||BORDERREMOVECALLBACK receives a Windows region that contains the current line to be removed. Setting this flag lets the user create his or her own composite of removed borders by combining the regions received by the callback function, if the callback function returns SUCCESS_REMOVE. The regions can be combined using a logical OR operator. Combining all regions received when the callback function returns SUCCESS_REMOVE results in a region identical to the region created when BORDER_SINGLE_REGION is set in uFlags. For an example, refer to L_BorderRemoveBitmap. When the region received by the callback function is no longer needed, it must be destroyed using DeleteObject().|
|BORDER_USE_VARIANCE||Consider border variance when performing border removal. If this flag is passed, the
|BORDER_SMART_AUTO_REMOVE||0x00001000, Used to automatically remove relatively wide black borders. If this flag is set, all other parameters will be ignored.|
|BORDER_ALLFLAGS||Use all behaviors of the border removal process.|
Flag that indicates which border to remove. These values can be combined using the OR operator ( | ). Possible values are:
|BORDER_LEFT||Remove the left border.|
|BORDER_RIGHT||Remove the right border.|
|BORDER_TOP||Remove the top border.|
|BORDER_BOTTOM||Remove the bottom border.|
|BORDER_ALL||Remove all borders. This is the same as BORDER_LEFT | BORDER_RIGHT | BORDER_TOP | BORDER_BOTTOM.|
Percent of the image dimension in which the border will be found. For most images, use 20. For example, if an image is 200 pixels wide, iBorderPercent is set to 20 and
uBorderToRemove is set to BORDER_LEFT, then the left border will be found in the area between the left edge of the image and a line 40 pixels from the left edge. If the border is closer to the edge of the image, use a smaller value. If the border is farther from the edge, use a larger value.
Amount of white noise tolerated when determining the border. The units are in pixels. Values of 0 to 10 are sufficient for most images.
Amount of variance tolerated in the border. If the border varies significantly in thickness, you should use a higher value for iVariance. Range is 0 to 10.
Pointer to a variable of type BITMAPHANDLE. If BORDER_SINGLE_REGION | BORDER_LEAD_REGION have been set in
uFlags, then when L_BorderRemoveBitmap returns, this is updated with a shallow copy of pBitmap that also has a region that contains the removed borders. To use this, declare a variable of type BITMAPHANDLE and point pBitmapRegion to this variable. Set
uFlags to (BORDER_SINGLE_REGION | BORDER_LEAD_REGION). It is the programmer's responsibility to free the region using L_FreeBitmapRgn() when it is no longer needed. Refer to the L_BorderRemoveBitmap example to see how pBitmapRegion is used and freed.
Size of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).
Handle to a windows region. When L_BorderRemoveBitmap returns, this is updated with a single windows region corresponding to all changes, only if BORDER_SINGLE_REGION has been set in
uFlags and BORDER_LEAD_REGION has not been set. To use this, set the flags field to (BORDER_SINGLE_REGION). It is the programmer's responsibility to delete this region using the windows C API DeleteObject() when the region is no longer needed.
To "fine-tune" the performance of L_BorderRemoveBitmap, try modifying the values for
For an example, refer to L_BorderRemoveBitmap.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries