ImageGear for C and C++ on Linux v19.10 - Updated
IG_fltr_ctrl_list
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Filter Functions > IG_fltr_ctrl_list

This function allows you to get the list of control parameters for each ImageGear filter you specify using FormatID argument.

Declaration:

 
Copy Code
AT_ERRCODE ACCUAPI IG_fltr_ctrl_list(
   DWORD dwFormatID,
   LPUINT lpnCount,
   LPVOID lpArray,
   DWORD dwArraySizeInBytes
);

Arguments:

Name Type Description
dwFormatID DWORD A constant indicating the format filter for which the information should be retrived. See enumIGFormats for possible values.
lpnCount LPUINT Returns the number of supported control parameters for the requested filter.
lpArray LPVOID Returns the array of control parameters for the requested filter. Application is responsible to allocate memory for lpArray buffer but IG fills each element of this array with pointer to static string. Application is not allowed to change memory referenced by any of those string pointers.
dwArraySizeInBytes DWORD Provides the size (in bytes) of memory allocated for lpArray pointer.

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.

Example:

 
Copy Code
AT_ERRCOUNT nErrcount;            // Count of returned errors on stack
UINT listLength;
LPSTR* lpList;
// Get a length of the control parameter list
nErrcount = IG_fltr_ctrl_list(IG_FORMAT_TIF, &listLength, NULL, 0);
if(nErrcount == 0)
{
    // Allocate memory for the list
    lpList = (LPSTR*)malloc(listLength * sizeof(LPSTR));
    // Get the control parameter list
    nErrcount = IG_fltr_ctrl_list(IG_FORMAT_TIF, &listLength, lpList, listLength * sizeof(LPSTR));

    // ...

    free(lpList);
}

Remarks:

See also the section Loading and Saving.