Updates the page bitmap data from a BITMAPHANDLE object.
Handle to the OCR page.
A BITMAPHANDLE that contains the image data that will be copied into this L_OcrPage.
An option to determine whether to free the current page bitmap handle.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
Once you create an OCR page, the bitmap data used to create the page is copied and stored inside the page. To get the bitmap handle that represents this page, use L_OcrPage_GetBitmap.
The bitmap handle object that the L_OcrPage_GetBitmap method returns contains a copy of the page image data in case you choose to get the processing bitmap. Any modifications you make to the bitmap handle will not affect the page. To update the page image data, you must call L_OcrPage_SetBitmap. Since the BITMAPHANDLE object is a copy in case you got the processing bitmap, you must free it by calling L_FreeBitmap method once you are done using it. But this does not apply to getting the original bitmap from the page, you can't free that bitmap handle if you choose the L_OcrBitmapSharingMode_AutoFree option when you created that page.
Once you obtain a BITMAPHANDLE object for this page, you can use it with other parts of LEADTOOLS, for example, you can use it to draw the bitmap inside your viewer window. You can also perform your own image processing on the page by getting the page btimap first using L_OcrPage_GetBitmap, apply some image processing operations on that bitmap like flipping it for example using L_FlipBitmap and then set it back to the page using L_OcrPage_SetBitmap.
Required DLLs and Libraries
For an example, refer to L_OcrPage_GetDeskewAngle