ImageGear for C and C++ on Windows v19.8 - Updated
IG_load_auto_detect_set
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Load Functions > IG_load_auto_detect_set

This function enables or disables a format filter.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_load_auto_detect_set(
   AT_MODE nFormatType,
   AT_BOOL bToggle
);

Arguments:

Name Type Description
nFormatType AT_MODE A constant indicating the format filter for which the detection setting should be modified. See enumIGFormats for possible values.
bToggle AT_BOOL Set to TRUE to enable detection; set to FALSE to disable detection. The default value is TRUE for most ImageGear format filters.

Return Value:

Returns 1 if successful. Otherwise, returns 0.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

ASCII

Example:

 
Copy Code
BOOL bEnabled = FALSE; /* If FALSE this file format will be disabled */
AT_ERRCOUNT nErrCount = IG_load_auto_detect_set ( IG_FORMAT_TIF , bEnabled);

Remarks:

If detection of a specific file format is disabled, that file format type cannot be accessed by the image info getting and loading functions, such as IG_info_get_ex or IG_fltr_load_file.

By default, detection is enabled for all ImageGear file format filters, except TXT (ASCII) and Headerless Digital Camera RAW.

See also function IG_load_auto_detect_get.