API Reference Guide > Core Component API Reference > Core Component Callback Functions Reference > LPAFT_IG_METAD_ITEM_SET_CB |
If this callback function is defined in the format filter, then during a filter WRITE operation it is called every time some data is ready to be written.
Copy Code
|
|
---|---|
typedef AT_BOOL (LPACCUAPI LPAFT_IG_METAD_ITEM_SET_CB)( LPVOID lpPrivate, AT_MODE FormatID, LPCHAR ItemName, DWORD ItemID, AT_MODE ItemType, LPVOID ItemValue, AT_MODE ValueType, DWORD ValueLength, AT_BOOL ReadOnlyValue, LPVOID* NewItemValue, LPAT_MODE* NewValueType, LPDWORD* NewValueLength ); |
Name | Type | Description |
---|---|---|
lpPrivate | LPVOID | Private callback data associated with the metadata callback function. |
FormatID | AT_MODE | The ID of the format filter that will send or get the item (IG_FORMAT_... constant). |
ItemName | LPCHAR | Text name of the item. |
ItemID | DWORD | Numerical ID of the item. |
ItemType | AT_MODE |
Specifies the type of the item and reflects the status of a given record. Possible values are:
|
ItemValue | LPVOID | If ItemType = IG_METAD_VALUE_ITEM then this argument contains the actual value of the item of the type specified by the ValueType parameter. Value is stored as an array of elements where each element contains values of type ValueType. The Length of array is provided in the parameter ValueLength. |
ValueType | AT_MODE | If ItemType = IG_METAD_VALUE_ITEM then ValueType contains the actual type of value stored in the ItemValue pointer. See Manipulating Image Data for the exact list of possible types. |
ValueLength | DWORD | If ItemType = IG_METAD_VALUE_ITEM then ValueLength contains the number of elements in array ValueItem of the type specified by ValueType. |
ReadOnlyValue | AT_BOOL | If this argument is TRUE, then the actual value of the item cannot be changed by the callback function, and the value is passed for informational purposes only. If FALSE, then the value of item can be changed, and the application can provide the new value through the next three parameters. |
NewItemValue | LPVOID* | Pointer to the new item value that the application may request to set as a replacement of the data passed in the ItemValue parameter. If it is not NULL, then the next two parameters contain the type of the value and the length of the array of elements. |
NewValueType | LPAT_MODE* | Specifies the type of the new item value passed through the NewItemValue parameter. |
NewValueLength | LPDWORD* | Specifies the size of the array passed through the NewItemValue pointer. |
Returns TRUE if ImageGear should overwrite the default item data with your data, or FALSE if ImageGear should ignore your data.
This function does not process image pixels.
JPEG
See example for IG_fltr_metad_callback_set() function.
The application can change/provide a new value for the given item using NewItemValue, NewValueType, and NewValueLength parameters. This new value is to be used as a replacement for the default data passed through the ItemValue parameter if ReadOnlyValue is FALSE. The callback function should return TRUE if the callback function has changed value, and FALSE if it has not changed.
See also IG_fltr_metad_callback_get(), IG_fltr_metad_callback_set(), LPAFT_IG_METAD_ITEM_ADD_CB, LPAFT_IG_METAD_ITEM_GET_CB functions and the section Manipulating Image Data.