ImageGear for C and C++ on Windows v19.1 - Updated
IG_REC_primary_reduction_mode_set
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Image Processing Functions > IG_REC_primary_reduction_mode_set

Specifies which image reduction mode will be used during the primary image conversion step.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_primary_reduction_mode_set(
   enumIGRecImgConversion Conversion
);

Arguments:

Name Type Description
Conversion enumIGRecImgConversion Primary image conversion mode to be set.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
ErrCount = IG_REC_primary_reduction_mode_set(IG_REC_IMG_CONVERSION_AUTO);

Remarks:

While loading an image to the recognition engine's memory space (IG_REC_PID_IMGINPUT process), an image conversion is performed according to the current image conversion mode setting.

The setting specified here will influence what kind of HIG_REC_IMAGE image will be created in the recognition engine's memory, i.e., whether it will be bi-tonal, grayscale, or color.

The following table demonstrates what kind of image will created in the recognition engine as the result of the image loading process.

Primary Image Conversion Mode Image Source is Bitonal Image Source is Grayscale Image Source is Color
IG_REC_IMG_CONVERSION_SET bi-tonal bi-tonal bi-tonal
IG_REC_IMG_CONVERSION_NO bi-tonal grayscale color
IG_REC_IMG_CONVERSION_GLOBAL bi-tonal bi-tonal bi-tonal
IG_REC_IMG_CONVERSION_GRAY bi-tonal grayscale grayscale