William Denton <wtd@pobox.com>
Correcting timestamp on photographs taken on an Acer Android phone
I have an Acer Liquid E phone running Android. All of the photographs it takes are timestamped in the internal EXIF metadata to 8 December 2002. Turns out there's a bug in the camera app: it seems that instead of using "insert correct date here" in libcamera.so somehow the December 2002 date got hardcoded in.
The timestamp on the file itself is correct, however, so I wrote this script to use that to edit the EXIF times. It uses ExifTool, which is probably in your package manager:
#!/bin/bash for I in 2002-12-08*jpg do TIMESTAMP=`stat --printf "%y" "$I"` NAME=`echo "$I" | sed 's/2002-12-08 12.00.00-//'` NAME="acer-$NAME" echo "$I --> $NAME ($TIMESTAMP)" cp -p "$I" $NAME exiftool -P -DateTimeOriginal="$TIMESTAMP" -CreateDate="$TIMESTAMP" $NAME done
For example, a file named 2002-12-08 12.00.00-460.jpg timestamped 2012-04-10 19:30 would have the DateTimeOriginal and CreateDate EXIF fields corrected to to 2012-04-10 19:30 and the file would be renamed to acer-460.jpg. The original file is left untouched.
It worked for me, and it won't delete your files, so use it if it helps. Make sure that whenever you copy files off your Acer phone you use cp -p to preserve the original timestamp. Otherwise your photos will have their internal dates set to today!
Main menu
"Legendo autem et scribendo vitam procudito." — Marcus Terentius Varro (116 - 27 B.C.)
Links
Recent comments
- Hey, Bill! Thanks for the
7 weeks 4 days ago - I am thinking about how to
8 weeks 2 days ago - ...mmmm
I have a similar
8 weeks 4 days ago - I like that you were painting
14 weeks 2 days ago - Western University might like
14 weeks 2 days ago - I travel across the border
15 weeks 2 days ago - It requires less of my time.
20 weeks 2 days ago - Why ubuntu over PC-BSD?
20 weeks 2 days ago - I didn't know about that,
22 weeks 5 days ago - Have you checked out the
22 weeks 5 days ago


Comments
Post new comment