L_OcrPage_GetOverlayBitmap - OCR Module - LEAD Engine C++ API Help

L_OcrPage_GetOverlayBitmap

#include "ltocr.h"

L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_GetOverlayBitmap(page, bitmapHandle, bitmapHandleSize)

L_OcrPage page; handle to the OCR page
BITMAPHANDLE* bitmapHandle; address to BITMAPHANDLE variable to be updated with the page overlay bitmap
L_UINT bitmapHandleSize; size of the BITMAPHANDLE structure

Gets the overlay bitmap of this L_OcrPage (if the page has one).

Parameter Description
page Handle to the OCR page.
bitmapHandle Address to BITMAPHANDLE variable to be updated with the page overlay bitmap.
bitmapHandleSize Size of the BITMAPHANDLE structure, use sizeof(BITMAPHANDLE).

Returns

SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The overlay image of an L_OcrPage will be used when the image is saved by an L_OcrDocument in the following situations:

By default, the overlay image is the original image used to create the page. It is the same value obtained by calling L_OcrPage_GetBitmap with L_OcrPageBitmapType_Original option.

In some situation, the user might want to use a different bitmap as the overlay. For example, a smaller version is passed to the OCR engine to conserve memory while the original version will only be used on save purposes in a PDF with image/text option. You can call L_OcrPage_SetOverlayBitmap before saving the document (memory-based) or adding the page to the document (file-based) and the engine will use this new bitmap as the overlay value. If auto-preprocessing was performed on the page through L_OcrPage_AutoPreprocess, then the same values might need to be applied to the overlay as well. Use L_OcrPage_GetAutoPreprocessValues to get the accumulative values of any inversion, rotation or deskewing applied by the pre-processor.

To clear the temporarily overlay image, call L_OcrPage_SetOverlayBitmap with a NULL value.

To get the overlay image at any time, call L_OcrPage_GetOverlayBitmap. Note that this property will return the same image reference passed to the last L_OcrPage_SetOverlayBitmap call. It will not return the original image.

The overlay bitmap is not freed by this L_OcrPage.

Required DLLs and Libraries

LTOCR
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Help Version 20.0.2018.6.21
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - LEAD Engine C API Help