---
title: "MetadataDictionary Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_MetadataDictionary.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# MetadataDictionary Class
 
This class represents a dicitonary of image metadata, such as EXIF or IPTC.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
<DefaultMemberAttribute("Item")> _
Public MustInherit Class MetadataDictionary _Inherits LockableObject _Implements IDictionary, ICloneable
```
 
```csharp
[DefaultMemberAttribute("Item")]
public abstract class MetadataDictionary : LockableObject, IDictionary, ICloneable
```
 
## Remarks
  
This abstract class contains partial implementation of the [ExifDictionary](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_ExifDictionary.htm.md) and [IptcDictionary](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IptcDictionary.htm.md) classes. It is used to read, write, and modify metadata stored in images.
 
Metadata is stored as pairs of keys and values. Key is an EXIF or IPTC tag (e.g. [DateTime](https://www.graphicsmill.com/docs/gm5/F_Aurigma_GraphicsMill_Codecs_ExifDictionary_DateTime.htm.md)), value is an actual value stored at this key (e.g. "2004:11:19 20:50:03"). To get a piece of data from the collection use property [Item\[Object\]](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_MetadataDictionary_Item_1_d02429b3.htm.md) or method [GetItemArray(Object)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_MetadataDictionary_GetItemArray_1_d02429b3.htm.md) (for several items). To check whether an item with certain key is available at the dictionary, you can use [Contains(Object)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_MetadataDictionary_Contains_1_d02429b3.htm.md) method. Also, you can get all keys or all values through [Keys](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_MetadataDictionary_Keys.htm.md) or [Values](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_MetadataDictionary_Values.htm.md) property correspondingly. For easier displaying, you can convert key into human-readable text string using [GetKeyDescription(Object)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_MetadataDictionary_GetKeyDescription_1_d02429b3.htm.md) method. Property [Count](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_MetadataDictionary_Count.htm.md) returns number of items in the dictionary.
 
Typically you get this class instance from [Exif](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_IMetadataReadSupport_Exif.htm.md) or [Iptc](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_IMetadataReadSupport_Iptc.htm.md) property of the format reader that implements [IMetadataReadSupport](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IMetadataReadSupport.htm.md) interface. You can also create new empty instance of [ExifDictionary](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_ExifDictionary.htm.md) or [IptcDictionary](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IptcDictionary.htm.md) class and put necessary details using [Add(Object, Object)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_MetadataDictionary_Add_2_df764941.htm.md) method. After that you can put this dictionary into [Exif](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_IMetadataWriteSupport_Exif.htm.md) or [Iptc](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_IMetadataWriteSupport_Iptc.htm.md) property of the format writer that implements [IMetadataWriteSupport](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IMetadataWriteSupport.htm.md) interface. This way you can save updated EXIF data into the image file.
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.LockableObject](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_LockableObject.htm.md)
        - Aurigma.GraphicsMill.Codecs.MetadataDictionary
            - [Aurigma.GraphicsMill.Codecs.MediaProcessorMetadataDictionary](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_MediaProcessorMetadataDictionary.htm.md)
            - [Aurigma.GraphicsMill.Codecs.ID3SynchronisedLyrics](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_ID3SynchronisedLyrics.htm.md)
            - [Aurigma.GraphicsMill.Codecs.AdobeResourceDictionary](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AdobeResourceDictionary.htm.md)
            - [Aurigma.GraphicsMill.Codecs.ExifDictionary](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_ExifDictionary.htm.md)
            - [Aurigma.GraphicsMill.Codecs.IptcDictionary](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IptcDictionary.htm.md)
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
   
## See Also

### Reference

- [MetadataDictionary Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Codecs_MetadataDictionary.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
