←Select platform

DeleteTagAsync Method

Summary

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

Syntax

C#
VB
WinRT C#
C++
public IAsyncAction DeleteTagAsync(  
   ILeadStream stream, 
   int pageNumber, 
   int id 
) 
Public Function DeleteTagAsync( _ 
   ByVal stream As ILeadStream, _ 
   ByVal pageNumber As Integer, _ 
   ByVal id As Integer _ 
) As IAsyncAction 
public IAsyncAction DeleteTagAsync(  
   ILeadStream stream, 
   int pageNumber, 
   int id 
) 
 function Leadtools.Codecs.RasterCodecs.DeleteTagAsync(  
   stream , 
   pageNumber , 
   id  
) 
public: 
IAsyncAction^ DeleteTagAsync(  
   ILeadStream^ stream, 
   int pageNumber, 
   int id 
)  

Parameters

stream
A ILeadStream containing the image data of the file from which to delete the tag.

pageNumber
The 1-based index of the page from which the tag will be deleted. Use -1 to delete the tag from the last page. Use 1 to delete the tag from the first page.

id
The ID of the tag in the TIFF file. The tag IDs are between 0 and 65535.

Return Value

An asynchronous delete operation on a RasterCodecs object.

Remarks

If you want to delete the tag from a particular IFD in the file, set RasterCodecs.Options.Tiff.Save.UseImageFileDirectoryOffset to true, and set RasterCodecs.Options.Tiff.Save.ImageFileDirectoryOffset to the IFD in question. 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 using RasterCodecs.Options.Tiff.Save.UseImageFileDirectoryOffset and RasterCodecs.Options.Tiff.Save.ImageFileDirectoryOffset specifying the IFD as above.

Notes:

  • The Leadtools.Codecs.Cmp.dll codec is used to delete the tag from all the TIFF and Exif files.
  • Do not attempt to use this method to delete tags from inside the TagFound event. If you want to delete tags that you enumerate, use the TagFound event to add the tags to a list. Upon returning from EnumTags, 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 TIF file!

When you add or remove tags, the tags array at the end of the file is re-written. When you modify existing tags, the new tag value is added to the file and the IFD is modified as necessary. Recompression is not performed under any of these cases.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly