ExifDictionary Class

Represents a dictionary of EXIF fields.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public sealed class ExifDictionary : MetadataDictionary, ICloneable

Remarks

All functionality of this class is implemented in base class MetadataDictionary. To put or get some EXIF field, you should use the Item[Object] property. Just pass ID of the EXIF field as an argument into this property. Refer EXIF specification for exact field ID values. Alternatively you can use static members Artist, DateTime, Make, Orientation, and others. Exact interpretations of these parameters can be found at EXIF specification. Currently specification 2.2 is supported.

Examples

The code below demonstrates how to extract and display both EXIF and IPTC data.

C#
using (var jpegReader = new JpegReader(@"Images\in.jpg"))
{
    //Read metadata
    var exif = jpegReader.Exif;
    var iptc = jpegReader.Iptc;

    //Show EXIF tags
    if (exif != null)
    {
        Console.WriteLine("EXIF");
        Console.WriteLine("---------------");
        foreach (long key in exif.Keys)
        {
            Console.WriteLine("{0}: {1}, {2}", exif.GetKeyDescription(key),
                exif[key], exif.GetItemString(key));
        }
    }

    //Show IPTC tags
    if (iptc != null)
    {
        Console.WriteLine("IPTC");
        Console.WriteLine("---------------");
        foreach (long key in iptc.Keys)
        {
            Console.WriteLine("{0}: {1}, {2}", iptc.GetKeyDescription(key),
                iptc[key], iptc.GetItemString(key));
        }
    }
}

Inheritance Hierarchy

System.Object
L Aurigma.GraphicsMill.Codecs.MetadataDictionary
L Aurigma.GraphicsMill.Codecs.ExifDictionary

Thread Safety

Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

See Also

Reference

Manual