0

Possible Duplicate:
Reading EXIF data from JPG

In my C# 3.0, .NET 3.5 project I am doing some image-related stuff. Particularly, I need to extract EXIF info.

Regular means of EXIF extraction have drawbacks:

  1. If I use standard Image class, it loads all image, not only EXIF, what causes performance problems on a huge amount of images (I am working with tens of thousands). Besides, it supports only regular image types, not raw files of digital cameras, such as, e.g. NEF, DSC, DNG.
  2. If I use GdPicture.NET library (which supports raw image formats), it also extremely long to load image (about half-minute for a single NEF file!), so I will need to wait days until EXIF is extracted for all images.

Is there any library to quickly extract EXIF info from regular jpeg images as well as raw images, without loading an image itself?

Community
  • 1
  • 1
Alex
  • 1,357
  • 3
  • 18
  • 41

1 Answers1

2

http://www.codeproject.com/Articles/36342/ExifLib-A-Fast-Exif-Data-Extractor-for-NET-2-0 seem slike it would do the job for you

** Introduction**

ExifLib simply reads Exif tags (i.e., camera model, GPS data, date picture taken, shutter speed etc.) from JPEG files, without the overhead introduced by using the GDI+ classes located in System.Drawing.Imaging, and with less lines of code for the developer.

It also looks like you can set validateimagedata when you read the image and that might speed it up faster, however it seems like the exiflib might still be faster

Daniel Powell
  • 8,143
  • 11
  • 61
  • 108
  • Thanks, Daniel! This really solves the problem, but unfortunately only partially (jpegs only). Do you know any library for raw formats? – Alex Sep 02 '12 at 11:11
  • It's open source (http://code.google.com/p/exiflibrary/source/browse/#svn%2Ftrunk%2FExifLibrary) you could probably look at their implementation and add your own for other format if you look at how they store exif – Daniel Powell Sep 02 '12 at 23:32