EXIF and other metadata

Read, modify and preserve image file metadata

  • EXIF
  • IPTC
  • XMP
  • Adobe Resource Blocks
  • Clipping Path
View Demo Download Trial

EXIF

EXIF data is typically created by the camera used to shoot a photo. Besides technical information about the camera and its settings, it contains the following important details:

  • Date created
  • GPS coordinates
  • Orientation
  • Thumbnail
  • ... and much more

Working with EXIF is very easy with Graphics Mill - just read a file and work with it as a named dictionary - pass a key and receive a string value or a textual version of a key.

This way you can quickly read a specific EXIF value or all values without having to load the entire bitmap. This is useful if you need to receive an image thumbnail quickly.

using (var reader = new JpegReader("in.jpg"))         
{         
 foreach (long key in reader.Exif.Keys)         
 {         
  Console.WriteLine("{0}: {1}, {2}",      
   reader.Exif.GetKeyDescription(key),      
   reader.Exif[key],      
   reader.Exif.GetItemString(key));      
 }         
}
View sample

IPTC

using (var reader = new JpegReader("in.jpg"))         
{         
 foreach (long key in reader.Iptc.Keys)         
 {         
  Console.WriteLine("{0}: {1}, {2}",     
   reader.Iptc.GetKeyDescription(key),      
   reader.Iptc[key],     
   reader.Iptc.GetItemString(key));         
 }          
}

Unlike EXIF, IPTC is more about content labeling rather than tech details about a photo. It contains such fields like title, author, copyright, etc. When a user modifies a photo file properties in Windows Explorer, he/she edits its IPTC fields.

Like EXIF, from Graphics Mill's point of view IPTC is a named dictionary of strings. Reading its values is very easy.

View sample

XMP

XMP is a more advanced version of IPTC presented by Adobe. It is not just a set of name-value pairs, but it allows more complexity such as arrays and structures, support for different namespaces, and you can even create your own namespace.

Graphics Mill allows automation of your catalog processing and labeling process. You can easily work with all XMP structures and allow your assets to retain their context when traveling across software, devices, and databases.

<dc:subject>     
 <rdf:Bag>     
  <rdf:li>nature</rdf:li>     
  <rdf:li>mountain</rdf:li>     
 </rdf:Bag>     
</dc:subject>     
...     
<xmpTPg:MaxPageSize rdf:parseType="Resource">     
 <stDim:w>11.0</stDim:w>     
 <stDim:unit>inch</stDim:unit>     
 <stDim:h>8.5</stDim:h>     
</xmpTPg:MaxPageSize>     
View sample

Adobe Resources (8BIM) and Clipping Path

Adobe Resource blocks (also known as 8BIM) are used by Photoshop to store information about user's manipulations. Graphics Mill allows extracting that data in binary form and you can use 8BIM specification to work with it.

The only exception is Clipping Path information. Graphics Mill can parse the binary data, convert it to a mask and apply it as an image's alpha channel.

You can copy clipping path data or preserve it while modifying the image. If the image is resized, the clipping path is automatically resized as well.

View sample