ImageGear for C and C++ on Windows v19.1 - Updated
IG_REC_redactor_redact
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Redactor Functions > IG_REC_redactor_redact

Redacts qualified text matches from a page, a document, or a Unicode string.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_redactor_redact(
   const HIG_REC_REDACTOR higRecRedactor,
   const AT_REC_MATCH_RESULT* const  match_result_array,
   const AT_INT match_result_size
);

Arguments:

Name Type Description
higRecRedactor const HIG_REC_REDACTOR The handle to a redactor instance.
match_result_array const AT_REC_MATCH_RESULT* const A vector of match result instances to redact.
match_result_size const AT_INT The number of match result instances in the vector.

Return Value:

The number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Example:

 
Copy Code
AT_ERRCOUNT errCount = 0 ;
AT_REC_MATCH_RESULT match_result_array [ 2 ] = {0} ;
HIG_REC_REDACTOR higRecRedactor = 0 ;

IG_REC_redactor_create( &higRecRedactor ) ;
IG_REC_redactor_redacted_cb_set( higRecRedactor , &on_redacted , NULL ) ;
IG_REC_redactor_progress_cb_set( higRecRedactor , &on_progress , NULL ) ;
errCount = IG_REC_redactor_redact
                        ( higRecRedactor, 
                          match_result_array, 
                          2
                        ) ;
IG_REC_redactor_delete( higRecRedactor ) ;

Remarks:

Modified pages cannot be reverted. Callers are advised to duplicate source data before redacting.

For supported raster images, the color values of pixels inside the bounding rectangle of matched letters are changed to obfuscate that letter.

Unless the source image is monochrome or RGB24 or indexed/8-bpp or gray/8-bpp, pixel data is converted to RGB24 before redacting match results; after all matches results are redacted, pixel data is converted to the original color space and bit depth.

This operation does not affect document metadata such as TIFF tags, PDF bookmarks, PDF metadata streams, embedded PDF files, DICOM tag values, JPEG EXIF tags, encrypted content, etc.

Supports redacting match results containing Asian language text.

The following installed callbacks are invoked during execution of this function:

The higRecRedactor owns all non-user data passed to the Redacted callback. To conserve system resources, all non-user data passed to the Redacted callback will be deleted after the Redacted callback returns. Callers that require access to this data after the callback returns must duplicate and assume ownership of the copy. The caller remains responsible for any user data provided.

When redacting an ImageGear recognition page match result, the image data referenced with HIG_REC_IMAGE is not modified.

When redacting an ImageGear recognition document match result, the data referenced with HIG_REC_DOCUMENT is not modified.

See Also

HIG_REC_REDACTOR