jlw said:
When I was first starting to work on this, I spent a lot of time looking at the raw text of ERF files, hoping I could figure out how to write an Applescript that would extract the header data -- but didn't have any luck. Somebody with more programming experience might be able to figure it out -- but if it's too big a problem for Dave Coffin, I figured it was too big a problem for me!
I don't think it is that big of a problem for us. For Dave it is, as he would have to support EXIF data for every file format dcraw supports. It would be a nightmare. For us, we just have one file format. I started poking around the file with the 'hexdump' command line utility, and noted that the exif data starts at 0x135 in the files. I grabbed 10 ERF files and they all have the data in the same location. If I can find the timestamp, and aperture, I should be all set.
Here's an example:
hexdump -s 0x134 -n 40 -c RAWFILENAME.ERF
It will display 40bytes of data starting at 0x134. You'll see this:
hexdump -s 0x134 -n 40 -c EPSN1693.ERF
0000134 E P S O N D S C P i c t u r
0000144 e \0 S E I K O E P S O N C O
0000154 R P . \0 R - D 1
000015c
------
I just found the timestamp. It starts at 0x17a. Run this command line to pull out the timestamp:
hexdump -s 0x17a -n 20 -c RAWFILENAME.ERF
Example:
hexdump -s 0x17a -n 20 -c EPSN1693.ERF
000017a 2 0 0 5 : 0 7 : 0 9 <space> 1 4 : 3 0
000018a : 5 3 \0
With the format of: Year:Month:date Hour:Minute:Second.
Cool.
I'm hoping that I'll be able to update my dcraw shell scripts to convert an ERF to JPEG with EXIF support in the next hour or two (unless my 8month old wakes up). If people are interested, I'll try and cobble together a writeup or .DMG installer. With some time, I may be able to cobble in some 'Automator' support.
As for Exif info, the only thing that interests me is the timestamp and exposure time. Anyone else need anything more?
-Paul
Edit: for some reason, the timetamp isn't appearing properly in this message. I've added the <space> to denote that the date is separated from the time value.
Moderators: I'm aware that this is a highly technical message for a photography forum, but in the light of getting the most out of our RAW files, I hope that you deem it to be on topic.