ImageGear for C and C++ on Windows v19.4 - Updated
IG_REC_image_import
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Recognition Image Preprocessing Functions > IG_REC_image_import

Imports an image into the recognition image management subsystem.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_image_import(
   HIGEAR hIGear,
   LPHIG_REC_IMAGE lphRecImage
);

Arguments:

Name Type Description
hIGear HIGEAR Handle of a HIGEAR image to import.
lphRecImage LPHIG_REC_IMAGE Address of a variable to store the handle of the created recognition image.

Return Value:

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

Supported Raster Image Formats:

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

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
HIGEAR higImage = 0;
HIG_REC_IMAGE higRecImage = 0;

ErrCount += IG_load_file("Image.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);

//...

ErrCount += IG_image_delete(higImage);
ErrCount += IG_REC_image_delete(higRecImage);

Remarks:

If the image pixel format is not supported by the Recognition engine natively, ImageGear converts the image into one of the supported raster image formats during the import. As a result, after exporting such image back to HIGEAR, its pixel format may differ from the original one. ImageGear uses the following conversion rules:

When importing, primary image conversion can be applied to the image depending on the current primary reduction mode (IG_REC_primary_reduction_mode_set). IG_REC_IMG_CONVERSION_NO mode is most efficient because it doesn't involve internal creation of an image copy.

This function activates the IG_REC_PID_IMGINPUT process.

The function will add IGE_INVALID_RESOLUTION_VALUE error to the error stack if the resolution of hIGear is zero or uses undefined units (IG_RESOLUTION_NO_ABS).

See Also

HIG_REC_IMAGE