This function allows you to set a control parameter value for the specified format filter.
Declaration:
Copy Code | |
---|---|
AT_ERRCODE ACCUAPI IG_fltr_ctrl_set(
DWORD dwFormatID,
const LPCHAR lpcsCtrlName,
LPVOID lpValue,
DWORD dwValueSize
);
|
Arguments:
dwFormatID | A constant indicating the format filter for which the control parameter should be set. See enumIGFormats for possible values. |
lpcsCtrlName | Specifies the name of control parameter you want to set. The list of names of supported control parameters can be obtained using IG_fltr_ctrl_list. |
lpValue | Specifies the new value for the control parameter. See Remarks. |
dwValueSize | Specifies the size (in bytes) of the control parameter value. |
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:
Filter, Vector, ASCII.
Example:
Copy Code | |
---|---|
AT_ERRCOUNT nErrcount; // Count of returned errors on stack DWORD bufferSize = 32767; // Get a type and a size of the control parameter nErrcount = IG_fltr_ctrl_set(IG_FORMAT_TIF, "BUFFER_SIZE", (LPVOID)(AT_UINT)bufferSize, sizeof(bufferSize)); |
Remarks:
See ImageGear Supported File Formats Reference section for description of all control parameters supported by ImageGear file format filters.
Use IG_fltr_ctrl_list to get the list of supported control parameters for a specific format. Use IG_fltr_ctrl_get to get the information about a specific control parameter, as well as its current value.
The rules for passing values to this function are as follows:
- For platform-dependent integers AT_INT and AT_UINT, as well as types derived from them, such as AT_DIMENSION, lpValue should contain the actual value.
- For other types, if the value size is less than or equal to sizeof(DWORD), then lpValue should contain the actual value; otherwise it should contain a pointer to the value.
See also the section Using Format Filters API for Filter Control.