ImageGear Professional DLL for Windows
IG_fltr_savelist_get_ex

This function prepares the list of constants corresponding to format and compression combinations available for saving of the specified image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_fltr_savelist_get_ex(
   const HIGDIBINFO hDIB,
   LPAT_MODE lpnFilterList,
   UINT nFListSize,
   LPAT_LMODE lpSaveList,
   UINT nSListSize,
   LPUINT lpnSListCount
);

Arguments:

Name Type Description
hDIB const HIGDIBINFO Handle of DIB info object that contains image parameters. If the value is not NULL, this function returns the list of enumIGSaveFormats values corresponding to saving formats (format and compression combinations) available for saving of the specified image. If the value is NULL, then the function returns the list of all currently supported saving formats for file formats specified by lpnFilterList. If both the hDIB and lpnFilterList are null, the function returns the list of all currently supported saving formats.
lpnFilterList LPAT_MODE Pointer to the list of format identifiers, which will be used in the save list. See enumIGFormats for possible values. If this parameter is NULL, then all currently supported formats will be used.
nFListSize UINT Array containing the number of elements if lpnFilterList is not NULL.
lpSaveList LPAT_LMODE Array containing the returned saving format constants. You can set this value to NULL if you only need to obtain the total number of found saving formats.
nSListSize UINT Size of the lpSaveList array.
lpnSListCount LPUINT If the lpSaveList array is not NULL, this parameter returns the number of copied enumIGSaveFormats values. If lpSaveList is NULL, this parameter returns the total number of records.

Return Value:

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

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

See GUI component source code.

Example:

 
Copy Code
AT_ERRCOUNT nErrCount;  // Number of errors on stack
HIGEAR hIGear;          // Handle of image
UINT nCount;            // Number of save formats
HIGDIBINFO hDIB;        // DIB info handle of image
LPAT_LMODE lpSaveList;

// Load the image
nErrCount = IG_load_file("picture.tif", &hIGear);
if( nErrCount == 0 ) 
{
    // Get DIB info
    nErrCount = IG_image_DIB_info_get(hIGear, &hDIB);
    // Get save formats count 
    nErrCount = IG_fltr_savelist_get_ex(hDIB, NULL, 0, NULL, 0, &nCount);
    // Allocate memory
    lpSaveList = (LPAT_LMODE)malloc( nCount*sizeof(AT_LMODE) );
    if( lpSaveList!=NULL )
    {
        // Get save list
        nErrCount = IG_fltr_savelist_get_ex(hDIB, NULL, 0, lpSaveList, nCount, NULL);
        
        //...

        // Delete memory
        free(lpSaveList);
        // Delete DIB info 
        IG_DIB_info_delete(hDIB);
    }
    // Delete the image
    IG_image_delete(hIGear);
}

Remarks:

Records returned by the function are sorted alphabetically by their short names. Short names correspond to those returned by IG_fltr_info_get function.

This function works similarly to IG_fltr_compressionlist_get_ex, but it works with all formats supported by ImageGear rather than with a particular format. Values returned in the lpSaveList can be passed directly to ImageGear saving functions such as IG_fltr_save_file.

See also the section Using Format Filters API for Image Saving.

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback