I trying to set the "GPSTimeStamp" into the exif tags of an jpg via android. The documentation is pretty scarce on this one:
http://developer.android.com/reference/android/media/ExifInterface.html#TAG_GPS_TIMESTAMP
Type is String. Constant Value: "GPSTimeStamp". But what is the exact format?
Looking here:
https://ExifTool.org/TagNames/GPS.html
GPSTimeStamp: rational64u[3] (when writing, date is stripped off if present, and time is adjusted to UTC if it includes a timezone)
So I need a long value a 3 cell array? I not sure, what to put in. I have obtained a "UTC time of this fix, in milliseconds since January 1, 1970." via location.gettime().
http://developer.android.com/reference/android/location/Location.html#getTime%28%29
If I write the long value as a string into the Timestamp and check the exif tags via "exif" on Linux, I get the error "denominator expected". All experiments with hh:mm:ss, or other formats have failed. Being a bit lost here.
Proper format for
GPSTimeStamp
attribute for sample time14:22:32
isYou can use following code:
It has similar format as
GPSLatitude
andGPSLongitude
attributes. Useful explanation for such format could be also found here: http://www.ridgesolutions.ie/index.php/2015/03/05/geotag-exif-gps-latitude-field-format/