ImageGear Professional DLL v17.1 for Windows Accusoft
IG_fltr_ctrl_get
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Filter Functions > IG_fltr_ctrl_get

Glossary Item Box

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.

Declaration:

  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
);

Arguments:

dwFormatID A constant indicating the format filter for which the information should be retrived. See enumIGFormats for possible values.
lpcsCtrlName 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 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 Returns the value type of control parameter.
lpdwValueSize 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 Pointer to a memory buffer which will be overwritten with the control parameter value.
dwBufferSize 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.

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:

ASCII, Flashpix, Medical and some others.

Example:

  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));
        
        // ...
    }
}

Remarks:

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 Using Format Filters API for Filter Control.

©2012. Accusoft Corporation. All Rights Reserved.