Project DescriptionA wrapper over .Net's Image.PropertyItems for easy retrieval of Exif metadata. Supports Exif 2.2 tags
The usage is very simple, see a snippet below or find a demo project in the downloaded zip file.
using System;
using System.Collections.Generic;
using Danielyan.Exif;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
var tags = new ExifTags(@"c:\temp\IMG_0034.JPG");
// Get all supported tag names.
// Not all of them are necessarily contained in the current image.
foreach (string tagName in ExifTags.SupportedTagNames)
Console.WriteLine(tagName);
// To output a single tag
try
{
ExifTag modelTag = tags["Model"];
Console.WriteLine(modelTag + "\n");
}
catch (KeyNotFoundException)
{
Console.WriteLine("Error: Tag not found");
}
// Sample output
// Field Id: 272
// Field Name: Model
// Description: Image input equipment model
// Field Value: Canon PowerShot SX110 IS
// To output all the tags in the file
foreach (ExifTag tag in tags.Values)
{
Console.WriteLine(tag + "\n");
}
}
}
}