DPChallenge: A Digital Photography Contest You are not logged in. (log in or register
 

DPChallenge Forums >> Tips, Tricks, and Q&A >> Get the time/date from your photos automatically
Pages:  
Showing posts 1 - 6 of 6, (reverse)
AuthorThread
10/06/2006 10:12:45 PM · #1
For the programmers out there, I read an interesting post about automatically getting the time and date from your photos using Perl. I created a PHP version of this as well. The author of the original post used a Sony DSC-S600. I used a Nikon D200. The time/date is stored in the same location of my raw (.NEF) files from my Nikon D200. Here is the php to get the time and date from my Nikon D200 .NEF files:


function get_date_time() {
// Open the file in Binary mode
$fr = fopen('NJF.nef', 'rb');

// Move pointer to 0x180
fseek($fr, 0x180);

// Read the 19 bytes
$date_time = fread($fr, 19);

// Print the result
print $date_time;
}

?>

Example output:

2006:09:02 12:42:12

You can read about how this is accomplished here. Check out the comments for my take with a Nikon D200 file.

It would be neat to write a program that automatically creates folders marked with the date and then automatically move the files to the correct folder based on the date found in the photo file. I usually organize all of my photos manually by creating folders. So this would make things easier.

Message edited by author 2006-10-06 22:13:29.
10/06/2006 10:21:47 PM · #2
I wonder if anyone in here writes computer programs?
10/06/2006 10:25:05 PM · #3
I use this silly pre-programmed thing Called Picasa2. I know, I know, not nearly as whiteNnerdy as what you've suggested, but it works for me. (keeps track o dem folder thingies too)
10/06/2006 10:26:17 PM · #4
Originally posted by wavelength:

I use this silly pre-programmed thing Called Picasa2. I know, I know, not nearly as whiteNnerdy as what you've suggested, but it works for me. (keeps track o dem folder thingies too)


lol, I like to get down to the bits and bytes. That's the fun part, for me anyway. :)
10/06/2006 10:30:35 PM · #5
whiteNnerdy? wuzzat?
10/07/2006 11:30:35 AM · #6
I already found a library for .NET to read the EXIF data from an image. I wrote a program to pull the information using this library. I then update my database with the image information.

I'd give out my website, but I'm afraid it might take down my cable modem network with all of DP visiting my site.
Pages:  
Current Server Time: 09/01/2025 04:47:14 AM

Please log in or register to post to the forums.


Home - Challenges - Community - League - Photos - Cameras - Lenses - Learn - Help - Terms of Use - Privacy - Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 09/01/2025 04:47:14 AM EDT.