ImageGear for C and C++ on Windows v19.6 - Updated
IG_save_tag_CB_register
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Save Functions > IG_save_tag_CB_register

This function has been deprecated and will be removed from the public API in a future release. Please use IG_fltr_metad_callback_set instead.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_save_tag_CB_register(
   LPFNIG_TAG_GET lpfnTagGet,
   LPFNIG_TAG_USER_GET lpfnTagUserGet,
   LPVOID lpPrivate
);

Arguments:

Name Type Description
lpfnTagGet LPFNIG_TAG_GET Pointer to callback function to be called during save operationS, prior to saving each Tag.
lpfnTagUserGet LPFNIG_TAG_USER_GET Pointer to callback function to be called to obtain additional user Tags.
lpPrivate LPVOID Pointer to private data (passed to callback function).

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:

JPEG, Filters

Example:

 
Copy Code
LPFNIG_TAG_GET    MyTagChanger = NULL;        // To change existing tags
LPFNIG_TAG_USER_GET  MyTiffTagger = NULL;    // Can add new tags
char* lpPrivate = NULL;                        // Pointer to private area
IG_save_tag_CB_register ( MyTagChanger, MyTiffTagger, (LPVOID) lpPrivate );

Remarks:

This function registers a callback function to be called for each Tag while saving a file.

A default value of the Tag is supplied, and can be changed in the callback function. See the description for callback function type LPFNIG_TAG_GET.

The second callback function you supply is of type LPFNIG_TAG_USER_GET, and permits you to provide additional tags. This can be used to add additional TIFF Tags when saving in TIFF format.