I am looking for simple straightforward solution for accessing EXIF information of jpeg images in .Net. Does anybody has experience with this?
7 Answers
If you're willing to use an open-source library, may I humbly suggest one of my own creation?
The metadata-extractor project has been alive and well since 2002 for Java, and is now available for .NET.
- Open source (Apache 2.0)
- Heavily tested and widely used
- Supports many image types (JPEG, TIFF, PNG, WebP, GIF, BMP, ICO, PCX...)
- Supports many metadata types (Exif, IPTC, XMP, JFIF, ...)
- Supports many manufacturer-specific fields (Canon, Nikon, ...)
- Very fast (fully processes ~400 images totalling 1.33GB in ~3 seconds) with low memory consumption
- Builds for .NET 3.5, .NET 4.0+ and PCL
It's available via NuGet or GitHub.
Sample usage:
IEnumerable<Directory> directories = ImageMetadataReader.ReadMetadata(path);
foreach (var directory in directories)
foreach (var tag in directory.Tags)
Console.WriteLine($"{directory.Name} - {tag.TagName} = {tag.Description}");

- 300,895
- 165
- 679
- 742
If you're compiling against v3 of the Framework (or later), then you can load the images using the BitmapSource
class, which exposes the EXIF metadata through the Metadata
property

- 37,700
- 14
- 97
- 166
A new and very fast library is ExifLib - A Fast Exif Data Extractor for .NET 2.0 by Simon McKenzie. I ended up using this one and the code is easy to use and understand. I used it for an app to rename according to the date taken. I wonder how many times such an app has been written.
My tip: Make sure to call Dispose on the ExifReader objects once you've finished with them or the files remain open.

- 59
- 1
- 1
-
Seems promising.. Thank you – Odys Apr 14 '14 at 13:53
-
It doesn't support raw files! only works with JPG ! – S.Serpooshan Jun 19 '19 at 08:20
-
Since its latest version seems to be from 2015 (see [on nuget.org](https://www.nuget.org/packages/ExifLib)), version 1.7 only supports EXIF 2.3, none later. – dakab Feb 19 '23 at 10:40
I like Atalasoft's DotImage Photo, but its a closed source solution and costs about 600 per dev license.
You can also check out DTools at Codeplex, which is an open source framework designed to supplement the standard Fx. It includes some Exif related classes.
the one I have saved in feeddemon for me to check out more when I have time (when is that for a programmer? LOL) is below
ExifTagCollection - EXIF Metadata extraction library
Mike

- 720
- 2
- 10
- 17
Check out this metadata extractor. It is written in Java but has also been ported to C#. I have used the Java version to write a small utility to rename my jpeg files based on the date and model tags. Very easy to use.

- 1,962
- 19
- 22
-
Cheers Dave. I've now [ported this library to .NET](http://stackoverflow.com/a/31329551/24874). – Drew Noakes Jul 09 '15 at 22:50
Several years ago, I started a little JPEG EXIF app with Omar Shahine to work on JPEG EXIF files, called JpegHammer.
He extracted from that project a library and called it PhotoLibrary, it was an easy .NET wrapper for the EXIF 2.2 tags. Unfortunately, the GotDotNet site is gone, CodePlex doesn't have it, Omar's web site links don't work, and I don't have a copy anymore.
But, if you can dig around Google, maybe you'll find it and it'll do the trick for you.

- 34,724
- 14
- 83
- 123