[KimDaBa] Scraping new EXIF dates on "old" images
jedd at progsoc.org
Fri Feb 27 05:04:31 GMT 2004
On Thu February 26 2004 04:27 pm, Jody Harris wrote:
] Is there a way to ask 1.1 to rescan all images to extract the EXIF date
] and replace the existing date in the database?
This is the main reason it took me about 4 weeks of experimenting
before I started 'the one xml file' that I'll keep forever. The delay
was as I went through and wrote scripts & changed dates on every
image file I had.
The scripts are pretty custom for my purposes, but might be of use
if anyone's interested.
The two big things were setting the file's time to match any EXIF data
within the image. This was mostly against photos I'd taken, and so I
trusted the EXIF date data (though there's date-taken, date-digi, date-created
records available in the EXIF standard). For digital photos from people
who are less anal about the time being right in their camera .. it involves
some manual checking back to known events & times. Time consuming,
to be sure.
The second thing was setting up timestamp.txt files in each directory of
scanned photos (most of my scans are APS so I can get the date & time,
as printed on the back of each photo). This is particularly time-consuming
to set up, but once I've got a '0-timestamp.txt' file in a directory, the script
does the rest. It inserts EXIF time-date entries, and touch's the file.
This isn't much use to you right now, after you've started your database,
but I mention it for two reasons. (There's two of everything.) Firstly, you
may want to fix up all your dates & times properly against the files, on
the off-chance that you might benefit from this later. I anticipate using
kimdaba forever now, a decision I feel is pretty safe since Jesper's going
to do the same thing. But you may be afraid of that kind of long-term
commitment. ;) Anyway, time-consuming though it is, it's probably
a worthwhile investment of your time.
Secondly, the tools I used may be retro-useable by you, if you've got some
scripting ability (I wrote mine in bash, but obviously any language could
do this). Using the 'exiftools' (URI: http://www.hugsan.com/EXIFutils/ )
you should be able to script something to rip out the right time from the image
files, change the time-stamp of the file, and the entries in kimdaba's index.xml
This would be tricky, but not hugely difficult. Jesper could then offer that
script on his web page, as I'm sure other people hit this problem periodically.
FYI exifedit can insert new entries into files that don't contain any EXIF
data at all. I'm inserting date/time, artist, make, model, image width & height
for scans of my old film-camera. "exiffile -t" will touch a file's timestamp
to match whatever the EXIF date is set to, which is what I run over newly
acquired images before running up kimdaba, so that there's zero confusion
about the time as far as kimdaba is concerned.
More information about the Kphotoalbum