Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.6.9
|
Leadtools.Forms.Ocr Assembly > Leadtools.Forms.Ocr Namespace > IOcrPage Interface : GetOverlayImage Method |
RasterImage GetOverlayImage()
'Declaration
Function GetOverlayImage() As RasterImage
'Usage
Dim instance As IOcrPage Dim value As RasterImage value = instance.GetOverlayImage()
RasterImage GetOverlayImage()
- (nullable LTRasterImage *)overlayImage:(NSError **)error
public RasterImage getOverlayImage()
function Leadtools.Forms.Ocr.IOcrPage.GetOverlayImage()
RasterImage^ GetOverlayImage();
The overlay image of an IOcrPage will be used when the image is saved by an IOcrDocument in the following situations:
If the page contains a graphics zone (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 the default, the overlay image is the original image used to create the page. It is the same value obtained by calling GetRasterImage with OcrPageType.Original.
In some situation, the user might want use a different image 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 SetOverlayImage before saving the document (memory-based) or adding the page to the document (file-based) and the engine will use this new image as the overlay value. If auto-preprocessing was performed on the page through AutoPreprocess, then the same values might need to be applied to the overlay as well. Use GetPreprocessValues to get the accumulative values of any inversion, rotation or deskewing applied by the pre-processor.
To clear the temporarily overlay image, call SetOverlayImage with a null value.
To get the overlay image at any time, call GetOverlayImage. Note that this property will the same image reference passed to the last SetOverlayImage call. It will not return the original image.
The overlay image is not disposed by this IOcrPage.
For an example, refer to SetOverlayImage.