GdPicture image identifier.
Must be a value between 1 and the number of tags attached to a GdPicture image.
Example





In This Topic

TagGetName Method (GdPictureImaging)

In This Topic
Returns as string a tag name attached to a GdPicture image.
Syntax
'Declaration
 
Public Function TagGetName( _
   ByVal ImageID As Integer, _
   ByVal TagNo As Integer _
) As String
public string TagGetName( 
   int ImageID,
   int TagNo
)
public function TagGetName( 
    ImageID: Integer;
    TagNo: Integer
): String; 
public function TagGetName( 
   ImageID : int,
   TagNo : int
) : String;
public: string* TagGetName( 
   int ImageID,
   int TagNo
) 
public:
String^ TagGetName( 
   int ImageID,
   int TagNo
) 

Parameters

ImageID
GdPicture image identifier.
TagNo
Must be a value between 1 and the number of tags attached to a GdPicture image.

Return Value

The name of the tag.
Example
Reading the tags from a jpeg image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", false);
 
    // Write in a report all the tags available within the file.
    StringBuilder report = new StringBuilder();
    int tagCount = gdpictureImaging.TagCount(imageID);
    for (int tagNo = 1; tagNo <= tagCount; tagNo++)
    {
        Tags tagID = gdpictureImaging.TagGetID(imageID, tagNo);
        string tagName = gdpictureImaging.TagGetName(imageID, tagNo);
        string tagValue = gdpictureImaging.TagGetValueString(imageID, tagNo);
 
        report.AppendLine(tagID.ToString() + " " + tagName.ToString() + " " + tagValue.ToString());
    }
    gdpictureImaging.ReleaseGdPictureImage(imageID);
 
    MessageBox.Show(report.ToString(), "Tags", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
See Also