ImageGear for C and C++ on Windows v19.0
IG_fltr_formatlist_get

This function searches and returns the list of ImageGear supported format filters which provide the specified features.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_fltr_formatlist_get(
   DWORD dwFlags,
   LPAT_MODE lpFormatList,
   UINT nFListSize,
   LPUINT lpnFListCount
);

Arguments:

Name Type Description
dwFlags DWORD Specifies format filter features. Can be any combination of constants from enumIGFltrFormatFlags enumeration.
lpFormatList LPAT_MODE Pointer to an array of AT_MODE where the file format constants will be returned. See enumIGFormats for possible values. Set to NULL if you only need to obtain the number of format filters returned by the search.
nFListSize UINT Size of lpFormatList array if it is not NULL.
lpnFListCount LPUINT If lpFormatList is not NULL, then the number of copied format identifiers are returned. Otherwise, the total number of formats is returned.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

See GUI component source code.

Example:

 
Copy Code
AT_ERRCOUNT nErrCount;    // Count of errs on stack upon ret from func
UINT nCount;            // Count of supported formats
LPAT_MODE lpFormatList; // list of formats
// Get list of filters that support detect and saving:
// Get total count
nErrCount = IG_fltr_formatlist_get(IG_FLTR_DETECTSUPPORT|IG_FLTR_PAGEINSERTSUPPORT, NULL,
    0, &nCount );
if( nErrCount==0 ) 
{
    // Allocate memory
    lpFormatList = (LPAT_MODE)malloc( nCount*sizeof(AT_MODE) );
    if( lpFormatList!=NULL )
    {
        // Get supported formats
        IG_fltr_formatlist_get(IG_FLTR_DETECTSUPPORT|IG_FLTR_PAGEINSERTSUPPORT,
            lpFormatList, nCount, NULL );

        // ...

        // Release memory
        free( lpFormatList );
    }
}

Remarks:

This function searches for filters that support ALL requested features (rather than some of them).

Typically, you will call this function twice to obtain the list of functions. The first time you will obtain the number of values to allocate the lpFormatList array of the necessary size, and the second time you will receive the actual values.

See also the section Loading and Saving.

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback