LEADTOOLS Image File Support (Leadtools.Codecs assembly)
LEAD Technologies, Inc

DeleteTag(Stream,Int32,Int32) Method






A System.IO.Stream containing the image data of the file from which to delete the tag.
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.
The ID of the tag in the TIFF file. The tag IDs are between 0 and 65535.
Deletes a tag from a stream, if the file supports tags (TIFF or Exif). .NET support Silverlight support
Syntax
public void DeleteTag( 
   Stream stream,
   int pageNumber,
   int id
)
'Declaration
 
Public Overloads Sub DeleteTag( _
   ByVal stream As Stream, _
   ByVal pageNumber As Integer, _
   ByVal id As Integer _
) 
'Usage
 
Dim instance As RasterCodecs
Dim stream As Stream
Dim pageNumber As Integer
Dim id As Integer
 
instance.DeleteTag(stream, pageNumber, id)
public void DeleteTag( 
   Stream stream,
   int pageNumber,
   int id
)
 function Leadtools.Codecs.RasterCodecs.DeleteTag(Stream,Int32,Int32)( 
   stream ,
   pageNumber ,
   id 
)
public:
void DeleteTag( 
   Stream^ stream,
   int pageNumber,
   int id
) 

Parameters

stream
A System.IO.Stream 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.
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:

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. In all of these cases, there is no image recompression.

Example
For an example, refer to DeleteTag.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RasterCodecs Class
RasterCodecs Members
Overload List
Implementing TIFF Comments and Tags

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.