L_Doc2GetRecognizedCharactersColorsExt

#include "ltdoc2.h"

L_LTDOC2_API L_INT L_Doc2GetRecognizedCharactersColorsExt(hDoc, nDocId, nPageIndex, pClrs, pnClrsCount)

Gets the recognized characters colors.

Parameters

L_HDOC2 hDoc

Handle to the OCR document. This handle is obtained by calling the L_Doc2StartUp function.

L_INT nDocId

Document ID created by calling L_Doc2CreateDocument.

L_INT nPageIndex

Zero-based index of the page.

COLORREF * pClrs

Address of an array of COLORREF to be updated.

L_INT * pnClrsCount

Address of a variable to be updated with the number of elements in the array.

Returns

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

Comments

Getting the foreground and background colors for the recognized characters is a multi-step process.

  1. Call the L_Doc2Recognize / L_Doc2RecognizeExt function to fill the RECOGCHARS2 structure with the indices for the foreground and background colors.

  2. Next, call L_Doc2GetRecognizedCharacters / L_Doc2GetRecognizedCharactersExt in order to get the foreground and background colors.

  3. Now call L_Doc2GetRecognizedCharactersColorsExt, passing NULL to _pClrs_, in order to get the elements count of the colors array.

  4. Allocate the array of COLORREF.

  5. Call L_Doc2GetRecognizedCharactersColorsExt again, this time passing the address of the allocated array to the pClrs parameter to get the colors.

Required DLLs and Libraries

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

LEADTOOLS OCR Module - OmniPage Engine C API Help