#include "ltocr.h"

L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_GetOverlayBitmap(page, bitmapHandle, bitmapHandleSize)

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


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, use sizeof(BITMAPHANDLE).


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


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

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.