User Guide > How to Work with... > OCR > How to... > Auto-Redact > Redact |
The redact operation is conducted by an ImageGear redactor object (HIG_REC_REDACTOR) against an array of matches (AT_REC_MATCH_RESULT) to produce redacted duplicates of the searched page (HIGEAR), document (HMIGEAR), or Unicode string.
To redact a page, document or string:
Manage the lifetime of the redactor object using IG_REC_redactor_create and IG_REC_redactor_delete.
Create a redactor object using the function IG_REC_redactor_create. When it is no longer needed, use the function IG_REC_redactor_delete to release its resources.
ImageGear HIG_REC_REDACTOR instances are not thread-safe. Callers are responsible for synchronizing access to instances shared across multiple threads before invoking operations that could modify or delete that instance. |
After creating a redactor object, configure the style information used to redact search matches and to receive notifications as the matches are redacted. Configurable settings include:
To give the appearance that text has been erased instead of redacted, choose a fill color that matches the page background color, e.g., white on white. |
Choose a color that contrasts well with the fill color, e.g., black on white. |
To visually identify how many characters are redacted, choose a distinguishable replacement character, e.g., asterisk ("*", U+002A). |
If the font size is too large for a match’s bounding box, replacement text will be clipped. |
Applications that need access to redacted callback data after the callback returns must duplicate relevant data and assume ownership of the copy. |
Any changes made to the HMIGEAR sources before redact is stopped are retained. |
After the redactor has been configured, redact the matches recovered from the search of the page, document or Unicode string using the function IG_REC_redactor_redact.
|