EXIF metadata written with two zero terminators occasionally
Camera app for Android.
Brought to you by:
mark-h
Hi,
I'm using OpenCamera 1.53.1 from F-Droid.
It seems OpenCamera (sometimes) writes the EXIF metadata with two zero terminators, e.g. in the DateTime fields. This might throw off some other software, see e.g. https://github.com/darktable-org/darktable/issues/17389
However, this is not always the case. I've also had photos where the EXIF metadata was written "correctly". I haven't been able to figure out under which circumstances this happens. (My initial idea was it is related whether you start OC from lockscreen vs while the phone is unlocked, this is not the case, however).
Output of an exiv2 of my current photo storage:
$ exiv2 -pe * | grep DateTimeOriginal
IMG_20240824_213445.dng Exif.Image.DateTimeOriginal Ascii 20 2024:08:24 21:34:44
IMG_20240824_213445.jpg Exif.Photo.DateTimeOriginal Ascii 20 2024:08:24 21:34:45
IMG_20240825_112207.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:25 11:22:07
IMG_20240825_134751.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:25 13:47:51
IMG_20240825_134811.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:25 13:48:11
IMG_20240825_134857.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:25 13:48:57
IMG_20240825_134913.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:25 13:49:13
IMG_20240825_135216.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:25 13:52:16
IMG_20240826_093336.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:26 09:33:36
IMG_20240829_102156.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:29 10:21:56
IMG_20240829_102204.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:29 10:22:04
IMG_20240829_103203.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:29 10:32:03
IMG_20240829_113628.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:29 11:36:28
IMG_20240829_183904.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:29 18:39:04
IMG_20240829_183916.jpg Exif.Photo.DateTimeOriginal Ascii 21 2024:08:29 18:39:16
Anonymous
Additional exiv2 output:
By default the JPEG file comes direct from the camera driver, so it may be a device issue (Do other third party camera applications have the same issue?)
A difference may be things like photo mode - if using NR or HDR (instead of STD) photo mode, then the JPEG is saved by Open Camera (using standard Android API), I don't know if that is why it sometimes works?