Since the number of photos I made with the Sony Cyber-Shot DSC-S600 I own is growing and growing I am looking for a way to organize it a bit better. I started with downloading pictures to a folder named after the year, month and day (i.e. yyyymmdd format). But when I ended up with several of such folders I had no idea which pictures were contained in which folder. So I decided to add a short description after the folder name, for example:
Read the rest of Getting the date and time of digital photos.
I have a Nikon D200 camera. The date is visible in the file, but the date starts at 0xb4. So yes, not all cameras store the date in the same place. Interesting idea though. I am going to try extracting the dates from my photos using php.
Actually, the time/date in the files from my Nikon D200 begin at 0x180. That was a nice challenge. I now have a small php5 function that opens my Nikon D200 files and prints the date. Here it is:
<?php
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
Thanks Nick for sharing.
Note that your comment doesn't show up immediately. I review each comment before I add it to this site.
Check the Follow this page option if you want to receive an email each time a comment is posted to this page, including yours. A link to turn this option off will be included with each email.
Internet adresses will be converted automatically. You can use the following notation to specify anchor text for a link: [url=http://example.com/]example text[/url].
Way cool, some regular digital photo forensics. It works on my Canon PowerShot as well. I bet this is a pretty common encoding method on all digital photos.