[KPhotoAlbum] GPSDateStamp + GPSTimeStamp

Johannes Zarl-Zierl johannes at zarl-zierl.at
Sat Apr 28 23:04:00 BST 2018


Hi Benny,

When I encounter images with incomplete metadata, I usually fix the images 
before import. This way, not only KPA but also other tools get the date/time 
right.

In my experience, using the time from the filename is more robust than using 
GPS data, because the GPS data is often missing from indoor photos.

For your example image, this little bash snippet should do the job:

for f in img_*.jpg
do
 # extract date/time from filename:
 dt="${f/img_/}"
 dt="${dt/.jpg/}"
 # set CreateDate if not already there:
 exiftool -d "%Y%m%d_%H%M%S" -if 'not $exif:CreateDate' -createdate="$dt" "$f" 
done

HTH,
  Johannes


Am Samstag, 28. April 2018, 17:37:45 CEST schrieb Benny Simonsen:
> Hey
> 
> Pictures taken with my phone are sorted wrong
> 
> They does not contain a DateTime field in the Exif.Image section of exif
> data.
> They contain a GPSDateStamp + GPSTimeStamp in Exif.GPSInfo section of exif
> data.
> ... and the file date is set to when they have been copied from the phone,
> so it is not usable.
> 
> Does this work for you - and how?
> 
> OS: Linux Mint 18.3 (Ubuntu 16.04)
> KPhotoalbum: New from git.
> Note jhead can't read the GPSDateStamp + GPSTimeStamp, but I can see them
> in KPhotoalbum Exif viewer.
> 
> Example image: http://slbs.dk/img_20160508_205637.jpg
> exif command gives the following output:
> EXIF tags in 'img_20160508_205637.jpg' ('Motorola' byte order):
> --------------------+-------------------------------------------------------
> --- Tag                 |Value
> --------------------+-------------------------------------------------------
> --- Orientation         |Top-left
> Model               |Nexus 6
> Image Width         |4160
> Image Length        |3120
> Manufacturer        |motorola
> X-Resolution        |72
> Y-Resolution        |72
> Resolution Unit     |Inch
> F-Number            |f/2,0
> Focal Length        |3,8 mm
> Aperture            |2,00 EV (f/2,0)
> Pixel X Dimension   |4160
> Shutter Speed       |-7,81 EV (224 sec.)
> ISO Speed Ratings   |40
> Pixel Y Dimension   |3120
> Exposure Time       |1/226 sec.
> Exif Version        |Exif Version 2.1
> FlashPixVersion     |FlashPix Version 1.0
> Color Space         |Internal error (unknown value 65535)
> GPS Date            |2016:05:08
> Altitude Reference  |Sea level
> East or West Longitu|E
> Longitude           |10,  0, 36,44
> North or South Latit|N
> GPS Time (Atomic Clo|18:56:26,00
> Altitude            |49,00
> Latitude            |57,  6, 26,52
> --------------------+-------------------------------------------------------
> ---
> 
> Br,
> Benny




More information about the Kphotoalbum mailing list