ImageGear Professional for Linux
IG_fltr_metad_callback_set

This function sets the callback functions that ImageGear uses to pass or receive metadata during save and load operations.

Declaration:

 
Copy Code
AT_ERRCODE ACCUAPI IG_fltr_metad_callback_set(
   LPVOID lpPrivate,
   LPAFT_IG_METAD_ITEM_SET_CB lpfnSetCB,
   LPAFT_IG_METAD_ITEM_ADD_CB lpfnAddCB,
   LPAFT_IG_METAD_ITEM_GET_CB lpfnGetCB
);

Arguments:

Name Type Description
lpPrivate LPVOID New value for private data to be associated with callback functions.
lpfnSetCB LPAFT_IG_METAD_ITEM_SET_CB New value of callback function of type LPAFT_IG_METAD_ITEM_SET_CB that is to be used for Set metadata operation.
lpfnAddCB LPAFT_IG_METAD_ITEM_ADD_CB New value of callback function of type LPAFT_IG_METAD_ITEM_ADD_CB that is to be used for Add metadata operation.
lpfnGetCB LPAFT_IG_METAD_ITEM_GET_CB New value of callback function of type LPAFT_IG_METAD_ITEM_GET_CB that is to be used for Get metadata operation.

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.

Example:

 
Copy Code
VOID ACCUAPI MetaDataGet(
        LPVOID   lpPrivate,            // Private callback data.
        AT_MODE  FilterID,
        LPCHAR   ItemName,            // Name of data item
        DWORD    ItemID,            // ID of data item
        AT_MODE  ItemType,            // Type of item
        LPVOID   ItemValue,            // value of item
        AT_MODE  ValueType,            // type of value
        DWORD    ValueLength,        // length of value
        AT_BOOL  ReadOnlyValue        // inform about is value is changeable or not
)
{
    // ...
}
BOOL ACCUAPI MetaDataSet(
   LPVOID         lpPrivate,        // Private callback data.
   AT_MODE        FilterID,
   LPCHAR         ItemName,            // Name of data item
   DWORD          ItemID,            // ID of data item
   AT_MODE        ItemType,            // Type of item
   LPVOID         ItemValue,        // value of item
   AT_MODE        ValueType,        // type of value
   DWORD          ValueLength,        // length of value
   AT_BOOL        ReadOnlyValue,    // inform about is value is changeable or not
   LPVOID         *NewItemValue,
   LPAT_MODE      NewValueType,
   LPDWORD        NewValueLength
)
{
    // ...
    return TRUE;
}
BOOL ACCUAPI MetaDataAdd(
        LPVOID  lpPrivate,            // Private callback data.
        AT_MODE FilterID,
        LPCHAR  *ItemName,            // Name of data item
        DWORD   *ItemID,            // ID of data item
        AT_MODE *ItemType,            // Type of item
        LPVOID  *ItemValue,            // value of item
        AT_MODE *ValueType,            // type of value
        DWORD   *ValueLength,        // length of value
        AT_BOOL *ReadOnlyValue        // inform about is value is changeable or not
)
{
    // ...
    return TRUE;
}

void Example_IG_fltr_metad_callback_set()
{
    AT_ERRCOUNT nErrcount;            // Count of returned errors on stack
    // Set metadata callback functions
    nErrcount = IG_fltr_metad_callback_set(NULL, MetaDataSet, MetaDataAdd, MetaDataGet);
}

Remarks:

See also the section Using Format Filters API for Filter Control.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback