#include "BIDocImg.H"
HANDLE CALLBACK DeskewDIB( HANDLE Hdib,
BOOL bWhiteBackground,
BOOL bShowProgress,
HWND hParent,
BOOL bFillBackground)
Description
This function will detect the angle of skewing of a scanned image and rotate the image to a precise position. The function works for only monochrome, 8 and 24 bit per pixel images. The most common case is that when the paper is white and the text is black on it. The rare case is when the paper is black and the text is white on it.
Parameters
|
HANDLE |
hDIB |
Handle of the image to deskew. |
|
BOOL |
bWhiteBackground |
TRUE, if the paper is white, and the text is black on it. FALSE, if the paper is black, and the text is white on it. |
|
BOOL |
bShowProgress |
if TRUE, a progress dialog will appear during deskweing. |
|
HWND |
hParent |
Handler of the parent window. |
|
BOOL |
bFillBackground |
If TRUE, the function will fill the image background after rotate. If bWhiteBackground is TRUE, the color of filling will be white. |
Return values
The handle of the new, deskewed DIB or NULL if an error occurred.
Programming notes
The function will not free the input DIB.
Requirements
Header : Declared in BIDocImg.h; include BIDocImg.h.
Library : Use BIDocImg.lib.
DLLs : BIDocImg.dll, BiDIB.dll.