Accusoft ImagXpress 12
TagAdd Method
See Also  Example  Send comments on this topic.
TagNbr
The tag number of the tag to add. See TagNumber property for more information on valid tag numbers.
TagType

The type of data within the tag.

  • TAG_BYTE (1) Byte

  • TAG_ASCII (2) Ascii character

  • TAG_SHORT (3) Short

  • TAG_LONG (4) Long

  • TAG_RATIONAL (5) Rational

  • TAG_SBYTE (6) Signed byte

  • TAG_UNDEFINE (7) 8 bit byte

  • TAG_SSHORT (8) Signed Short

  • TAG_SLONG> (9) Signed Long

  • TAG_SRATIONAL (10) Signed Rational

  • TAG_FLOAT (11) Float (4 Bytes)

  • TAG_DOUBLE (12) Double (8 bytes)

Length
The number of data elements in the tag.
Data
The tag's data items.
AccusoftImagXpress12 ActiveX DLL > ImagXpress Object : TagAdd Method

Glossary Item Box

Description

Adds a tag to the image's tag list.

Syntax

Visual Basic
Public Sub TagAdd( _
   ByVal TagNbr As Long, _
   ByVal TagType As Long, _
   ByVal Length As Long, _
   ByVal Data As Variant _
) 

Parameters

TagNbr
The tag number of the tag to add. See TagNumber property for more information on valid tag numbers.
TagType

The type of data within the tag.

  • TAG_BYTE (1) Byte

  • TAG_ASCII (2) Ascii character

  • TAG_SHORT (3) Short

  • TAG_LONG (4) Long

  • TAG_RATIONAL (5) Rational

  • TAG_SBYTE (6) Signed byte

  • TAG_UNDEFINE (7) 8 bit byte

  • TAG_SSHORT (8) Signed Short

  • TAG_SLONG> (9) Signed Long

  • TAG_SRATIONAL (10) Signed Rational

  • TAG_FLOAT (11) Float (4 Bytes)

  • TAG_DOUBLE (12) Double (8 bytes)

Length
The number of data elements in the tag.
Data
The tag's data items.

Remarks

Upon successful completion of this method, the current tag is updated.  Use the TagNumber, TagCount, TagType, TagLength, TagData properties and TagGetDataItem method to obtain information about the tag.

To modify a tag that already exists, use the TagModify Method. Attempting to add a tag which already exists will result in a IX_Error_TiffTag_AddError.

Note: Available in Professional Edition. 

Example

The enitre string will be added. The length of a TAG_ASCII tag should be set to the number of characters in the string plus one ( ie: one extra character for the NULL terminator).
Adding a TAG_ASCII (Visual Basic)Copy Code
ImagXpress1.TagAdd nTagNumber, TAG_ASCII, Len(strTagValue)+1, strTagValue
The data should be passed as a two element array of long values.
Adding a TAG_RATIONAL or TAG_SRATIONAL (Visual Basic)Copy Code
Dim R[2] As Long
R(0) = 600
R(1) = 1
ImagXpress1.TagAdd nTagNumber, TAG_RATIONAL, 1, R

See Also

©2013. Accusoft Corporation. All Rights Reserved.