GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / TagGetName Method
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
 

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