This callback function is used to insert new items during WRITE filter operation.
Declaration:
Copy Code | |
---|---|
typedef AT_BOOL (LPACCUAPI LPAFT_IG_METAD_ITEM_ADD_CB)( LPVOID lpPrivate, AT_MODE FormatID, LPCHAR ItemName, DWORD ItemID, AT_MODE ItemType, LPVOID ItemValue, AT_MODE ValueType, DWORD ValueLength, AT_BOOL ReadOnlyValue ); |
Arguments:
lpPrivate | Private callback data. |
FormatID | The ID of format filter that send or get the item (IG_FORMAT_... constant). |
ItemName | Provides the name of new item. |
ItemID | Numerical ID of item. |
ItemType |
Specifies the type of item and reflect the status of given record. Possible values are:
|
ItemValue | Value of new item. If ItemType = IG_METAD_VALUE_ITEM then ItemValue contains actual value of item of type specified by ValueType parameter. The ItemValue is stored as array of elements where each element contains values of type ValueType. Length of array is provided in parameter ValueLength. |
ValueType | If ItemType = IG_METAD_VALUE_ITEM then contains actual type of value stored in ItemValue pointer. See Non-Image data format section for exact list of possible types. |
ValueLength | Length of array in ItemValue. |
ReadOnlyValue | This parameter is not used. |
Return Value:
Returns TRUE if a new value is added to item data, FALSE if it is not. A return of TRUE will cause the call of the Add callback function one more time.
Supported Raster Image Formats:
This function does not process image pixels.
Sample:
JPEG
Example:
See example for IG_fltr_metad_callback_set() function.
Remarks:
If the return value is TRUE then a new value is added; and FALSE if value is not added. ImageGear will be calling Add callback function while it returns TRUE so callback function should return TRUE if providing of additional items is it not finished yet, and FALSE if it is finished. All parameters except of lpPrivate is used to get information about new value.
ImageGear assumes that all tags passed via LPAFT_IG_METAD_ITEM_ADD_CB callback are writable, except for the tags that were sent by LPAFT_IG_METAD_ITEM_SET_CB, marked as read-only.
See also IG_fltr_metad_callback_get(), IG_fltr_metad_callback_set(), LPAFT_IG_METAD_ITEM_GET_CB, LPAFT_IG_METAD_ITEM_SET_CB functions and the section Processing of non-image data through filter callback functions.