Menu

#1183 EXIF metadata written with two zero terminators occasionally

1.0
open
nobody
None
2024-09-03
2024-08-29
Anonymous
No

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

Discussion

  • Anonymous

    Anonymous - 2024-08-29

    Additional exiv2 output:

    $ exiv2 -ph '/home/andreas/Bilder/Syncthing/Pixel6a/OpenCamera/IMG_20240829_183904.jpg' '/home/andreas/Bilder/Syncthing/Pixel6a/OpenCamera/IMG_20240829_183916.jpg'  | grep  -A2 DateTimeOriginal
    /home/andreas/Bilder/Syncthing/Pixel6a/OpenCamera/IMG_20240829_183904.jpg  0x9003 Photo        DateTimeOriginal            Ascii      21  21
      0000  32 30 32 34 3a 30 38 3a 32 39 20 31 38 3a 33 39  2024:08:29 18:39
      0010  3a 30 34 00 00                                   :04..
    --
    /home/andreas/Bilder/Syncthing/Pixel6a/OpenCamera/IMG_20240829_183916.jpg  0x9003 Photo        DateTimeOriginal            Ascii      21  21
      0000  32 30 32 34 3a 30 38 3a 32 39 20 31 38 3a 33 39  2024:08:29 18:39
      0010  3a 31 36 00 00                                   :16..
    
     
  • Mark

    Mark - 2024-09-03

    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?

     

Anonymous
Anonymous

Add attachments
Cancel