Author Topic: Add incremented timestamp to a selection of scanned images  (Read 2658 times)

hluxem

  • Sr. Member
  • **
  • Posts: 332
Add incremented timestamp to a selection of scanned images
« on: April 27, 2015, 12:09:57 AM »
I did have a mix of scanned slides and negatives with no time stamp. Starting in IM3.6 I modified an existing script to write a time stamp and maintain a sequence of the pictures by incrementing the time for each picture.
First I sort the pictures in chronological order. Then I look for pictures with known dates like holidays or other special events. I select the pictures from the first known date to the last before the next known date and add the exif time stamp to the files. To keep the sequence the time is incremented 10 s for each file. This allows to later add another picture in between without changing the data of other images.
This is not perfect, but keeps my pictures organized in the time line and they are ordered chronological.

My scripting knowledge is less than basic, mostly copy and paste from other scripts and some help from other forum members and Mario. The script does what I want it to do for me, it maybe helpful for others as well. Please make sure you test on a copy of your pictures before working on real images.

I had quite some older movie clips with the date in the file name. Rather than writing a second script I added an option to extract the time from the file name and add it to the xmp exif data, just select Date time from file in the message box. The name needs to be ##YYYY-MM-DD HH-MM-SS. If there is no prefix or a different format, the following line needs to be changed:
date_check = Mid(Replace(f.Name,"-",":"),2,19)+ Setting_TimeZone


[attachment deleted by admin]

jch2103

  • Oldtimer
  • ****
  • Posts: 2265
Re: Add incremented timestamp to a selection of scanned images
« Reply #1 on: April 27, 2015, 01:09:12 AM »
Thanks. This looks like a useful script to deal with the problem of files that are missing time stamps.


For those who don't mind getting 'deep in the weeds', it's also possible to extract time/date information from (appropriate) file names via ExifTool (and by extension the IMatch Exiftool Command Processor). Anyone so inclined should see http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html#5. The advantage of this approach is that ExifTool is fairly flexible about the actual format of input date/time values. The disadvantage is the need to use ExifTool, either from the command line or from the ExifTool Command Processor.
John

Rhadamanthys

  • Jr. Member
  • *
  • Posts: 52
Re: Add incremented timestamp to a selection of scanned images
« Reply #2 on: January 15, 2016, 05:22:58 PM »
Code sample only, not for real use. Editing the "Date and Time" or "Increment..." field can easily create a Type Mismatch.