API Reference Guide > Core Component API Reference > Core Component Functions Reference > Filter Functions > IG_fltr_ctrl_get |
This function allows you to get full information about a control parameter supported by an ImageGear filter. It also returns the current or default value of the parameter.
Copy Code
|
|
---|---|
AT_ERRCODE ACCUAPI IG_fltr_ctrl_get(
DWORD dwFormatID,
const LPCHAR lpcsCtrlName,
AT_BOOL bGetDefault,
LPAT_MODE lpnValueType,
LPDWORD lpdwValueSize,
LPVOID lpBuffer,
DWORD dwBufferSize
);
|
Name | Type | Description |
---|---|---|
dwFormatID | DWORD | A constant indicating the format filter for which the information should be retrived. See enumIGFormats for possible values. |
lpcsCtrlName | const LPCHAR | Specifies the name of the control parameter you want to get the info about. Use IG_fltr_ctrl_list to obtain the names of control parameters supported for a format filter. |
bGetDefault | AT_BOOL | Set to TRUE to obtain the default value of the control parameter. Set to FALSE to obtain the current value of the control parameter. |
lpnValueType | LPAT_MODE | Returns the value type of control parameter. |
lpdwValueSize | LPDWORD | Returns the size in bytes of the memory buffer that should be allocated for lpBuffer to completely fit the returned value. If NULL then this parameter is ignored. |
lpBuffer | LPVOID | Pointer to a memory buffer which will be overwritten with the control parameter value. |
dwBufferSize | DWORD | The size of memory allocated for lpBuffer pointer. If it is less than the value returned through lpdwValueSize then only dwBufferSize bytes will be written to the lpBuffer, and no error will be returned. |
This function does not process image pixels.
ASCII, Flashpix, Medical, and some others.
Copy Code
|
|
---|---|
AT_ERRCOUNT nErrcount; // Count of returned errors on stack AT_MODE valueType; DWORD valueSize; DWORD bufferSize; // Get a type and a size of the control parameter nErrcount = IG_fltr_ctrl_get(IG_FORMAT_TIF, "BUFFER_SIZE", FALSE, &valueType, &valueSize, NULL, 0); if(nErrcount == 0) { // Get the control parameter if(valueType == AM_TID_DWORD && valueSize == sizeof(DWORD)) { nErrcount = IG_fltr_ctrl_get(IG_FORMAT_TIF, "BUFFER_SIZE", FALSE, NULL, NULL, &bufferSize, sizeof(bufferSize)); // ... } } |
The application is responsible for allocating memory for lpBuffer and freeing it when it is no longer in use.
Use function IG_fltr_ctrl_set to change the value of a control parameter .
See also the section Loading and Saving.