---
title: "IptcDictionary Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_IptcDictionary.htm
product: "Graphics Mill"
---

# IptcDictionary Class
 
Represents a dictionary of IPTC fields.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class IptcDictionary : MetadataDictionary, ICloneable
```
 
## Remarks
  
All functionality of this class is implemented in base class [MetadataDictionary](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_MetadataDictionary.htm.md). To put or get some IPTC field, you should use the [Item\[Object\]](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_MetadataDictionary_Item_1_d02429b3.htm.md) property. Just pass ID of the IPTC field as an argument into this property. Refer [IPTC specification](http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf) for exact field ID values. Alternatively you can use static members [Caption](https://www.graphicsmill.com/docs/gm/F_Aurigma_GraphicsMill_Codecs_IptcDictionary_Caption.htm.md), [Writer](https://www.graphicsmill.com/docs/gm/F_Aurigma_GraphicsMill_Codecs_IptcDictionary_Writer.htm.md), [Keyword](https://www.graphicsmill.com/docs/gm/F_Aurigma_GraphicsMill_Codecs_IptcDictionary_Keyword.htm.md), and others. Exact interpretations of these parameters can be found at [IPTC specification](http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf). Currently specification 4.1 is supported.
 
IPTC tags consist of two numbers. For example, "2:25" means "Keywords". To be able to pass these numbers into [Item\[Object\]](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_MetadataDictionary_Item_1_d02429b3.htm.md), you should pack them as follows: first byte stores the second number (25 in this example), the second byte stores the first number (2 in this example). Other two bytes are not used.
 
## Examples
  
The code below demonstrates how to extract and display both EXIF and IPTC data.
 
```csharp
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
    - [Aurigma.GraphicsMill.Codecs.MetadataDictionary](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_MetadataDictionary.htm.md)
        - Aurigma.GraphicsMill.Codecs.IptcDictionary
 
## 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

- [IptcDictionary Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Codecs_IptcDictionary.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)

### Manual

- [EXIF and IPTC Metadata](https://www.graphicsmill.com/docs/gm/exif-and-iptc-metadata.htm.md)
- [IPTC specification](http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf)
