ImageGear Professional v18.4 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Filter Functions > IG_fltr_formatlist_get |
This function searches and returns the list of ImageGear supported format filters which provide the specified features.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_fltr_formatlist_get( DWORD dwFlags, LPAT_MODE lpFormatList, UINT nFListSize, LPUINT lpnFListCount ); |
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. |
This function does not process image pixels.
See GUI component source code.
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 ); } } |
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 Getting Information and Sorting Images.