L_OcrPage_GetOverlayBitmap (original) (raw)
Summary
Gets the overlay bitmap of this L_OcrPage (if the page has one).
Syntax
#include "ltocr.h"
L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_GetOverlayBitmap(page, bitmapHandle, bitmapHandleSize)
Parameters
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).
Returns
Value | Meaning |
---|---|
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:
- If the page contains a graphics zone L_OcrZoneType_Graphics. The document will get the image to store in the document from the overlay image.
- If the output format supports the "Image over text" feature. Such as PDF with Image/Text option. The document will get the image to store in the document from the overlay image.
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.
See Also
Functions
- L_OcrPage_Destroy
- L_OcrPage_FromBitmap
- L_OcrPage_GetBitmap
- L_OcrPage_SetBitmap
- L_OcrPage_SetOverlayBitmap
- L_OcrPage_SetBitmapChangedCallback
- L_OcrPage_IsInverted
- L_OcrPage_GetRotateAngle
- L_OcrPage_GetDeskewAngle
- L_OcrPage_AutoPreprocess
- L_OcrPage_AutoZone
- L_OcrPage_GetZoneCount
- L_OcrPage_InsertZone
- L_OcrPage_AddZone
- L_OcrPage_IndexOfZone
- L_OcrPage_GetZoneAt
- L_OcrPage_SetZoneAt
- L_OcrPage_RemoveZone
- L_OcrPage_RemoveZoneAt
- L_OcrPage_ClearZones
- L_OcrPage_GetZoneCells
- L_OcrPage_SetZoneCells
- L_OcrPage_HitTestZone
- L_OcrPage_IsRecognized
- L_OcrPage_Recognize
- L_OcrPage_Unrecognize
- L_OcrPage_GetRecognizeStatistics
- L_OcrPage_GetRecognizedCharacters
- L_OcrPage_SetRecognizedCharacters
- L_OcrPage_FreePageCharacters
- L_OcrPage_GetZoneWords
- L_OcrPage_FreeWords
- L_OcrPage_GetText
- L_OcrPage_ExtractZoneMICRData
- L_OcrPage_DetectLanguages
- L_OcrPage_LoadZonesFile
- L_OcrPage_SaveZonesFile
- L_OcrPage_SaveXml
- L_OcrPage_GetAutoPreprocessValues
Topics
- Programming with LEADTOOLS OCR Module - LEAD Engine
- Starting and Shutting Down the OCR Engine
- Recognizing OCR Pages
- Working With OCR Pages
Example
For an example, refer to L_OcrPage_SetOverlayBitmap