Jump to content

reading EXIF data

- - - - -

  • Please log in to reply
4 replies to this topic

#1
Root23

Root23

    Programmer

  • Members
  • PipPipPipPip
  • 144 posts
I'm in the process of creating a small program to sort through photos, and place them into folders based on year, month, or date of special occasions.

What would be the most efficient way to run through 1,000+ images and get the Date Taken from the exif data?

I haven't found a tutorial that I can wrap my head around yet.

I found this link that gives me a rough idea, but I'm not sure about the Shell32 part.. it'd be nice to have a step-by-step tutorial on getting exif data.

Any help would be appreciated!

Thanks

Edited by Root23, 12 October 2010 - 10:45 PM.
title

Posted Image

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
There is a nice class here that people had linked to in similar questions such as this:
EXIFextractor library to extract EXIF information - CodeProject

It uses a class so there is no working with the shell directly and things.

I assume the steps would be:

  • Generate a list of filenames for the photos
  • Run a loop over the array and use the exif class in it
  • Extract date from exif and parse it to "month year"
  • Create directory of date from exif info, if it does not exist create it (i.e. july 2010)
I do not use C# so it is only theory I can help with, hopefully if somebody knows more they can help. :)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
Root23

Root23

    Programmer

  • Members
  • PipPipPipPip
  • 144 posts
Thanks for the link, and info. I remember stumbling across the exifextractor last night, but I skipped over it because at the time I was just trying to accomplish this using what's already built into C#/.net framework. However, at this point I don't guess it really matters if it gets the job done!

-edit- Just found this on MSDN.. I believe it's new to .net 4.0, which works out well for me.
BitmapMetadata.DateTaken Property (System.Windows.Media.Imaging)


Nullw0rm said:

There is a nice class here that people had linked to in similar questions such as this:
EXIFextractor library to extract EXIF information - CodeProject

It uses a class so there is no working with the shell directly and things.

I assume the steps would be:

  • Generate a list of filenames for the photos
  • Run a loop over the array and use the exif class in it
  • Extract date from exif and parse it to "month year"
  • Create directory of date from exif info, if it does not exist create it (i.e. july 2010)
I do not use C# so it is only theory I can help with, hopefully if somebody knows more they can help. :)

Edited by Root23, 12 October 2010 - 10:47 PM.

Posted Image

#4
Momerath

Momerath

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 242 posts
It's been there since version 3.0 :) And it doesn't support all the data that EXIF does.

#5
Root23

Root23

    Programmer

  • Members
  • PipPipPipPip
  • 144 posts

Momerath said:

It's been there since version 3.0 :) And it doesn't support all the data that EXIF does.

I noticed that after posting that it's been around since 3.0. It should work well for what information I do need.. which right now just pertains to the date taken. If I expand this later on I might need to look for another option.
Posted Image




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users