DeleteTag method (ILEADRasterIO)

Visual Basic Example

Visual C++ 5.0 example

 

Syntax

short DeleteTag(BSTR bstrFileName, short nPage, long uTag, long uFlags);

Overview

Refer to Implementing TIFF Tags

Remarks

Deletes a tag from a file, if the file format supports tags (TIFF or Exif).

When you add or remove comments or tags, the comments and tags array at the end of the TIFF/Exif image file is re-written. When you modify existing comments or tags, the new value is added to the file and the IFD is modified as necessary. In all of these cases, there is no image recompression.

If you want to delete the tag from a particular IFD in the file, set the SaveIFD property. This method will delete tags only from the main IFDs that make up an image. Some TIFF tags are themselves SubIFDs. You can delete tags from such SubIFDs by setting the SaveIFD property and specifying the IFD as above.

Notes:

The LFCMP filter is used to delete the tag from all the TIFF and Exif files.

 

Do not attempt to use this function to delete tags from inside an EnumTags event. If you want to delete tags that you enumerate, use the EnumTags event to add the tags to a list. Upon returning from the EnumFileTags method, you can delete all the tags from the list.

 

You should be careful when you delete non-custom tags (tags below 32768). If you delete the wrong tag, you might corrupt the TIFF file!

 

See Also

Elements:

ReadTag method, WriteTag method, SetTag method, GetTagData method, EnumFileTags method, EnumTags event

Topics

Raster Images: Maintaining TIFF Tags