opengisch / QField

A simplified touch optimized interface for QGIS

Home Page:http://www.qfield.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Store (rounded) camera/tablet-orientation in EXIF-metadata using QFIELD-camera-function

koenigherford opened this issue · comments

Describe the issue

As it's recommended in #5194 to use the QField-camera-function it will be great when QField-camera will detect the (rounded) camera-/tablet orientation (landscape format / portrait format) and store this information in the EXIF-"orientation-"metadata of the photo.

With this it will be avoided to rework the orientation-information manually and results of fieldwork can be viewed on computer in an auto-rotated/correct way.

Reproduction steps

Steps to reproduce the behavior:

  1. Create a project within QGIS and a layer with another photo-attachment-child-layer
  2. Configure syncronisation with QFieldSync (in my case: max image-attachment-size /(with or height) = 1600px
  3. Export project to folder, copy it on mobile device
  4. Collect some data with QField and some photo-attachments
  5. Transfer data to computer and syncronize it with QFieldSync
  6. Go to Windows-Explorer or other favourite image-viewer

Expected behavior

Expected: Photos taken in landscape-orientation are in rotated correctly (height is smaller than width) and photos taken in potrait-format are upright in viewer (height is larger than width)

Observed behavior

All photos are in potrait-format although taken in landscape-mode

Screenshots and GIFs

grafik

Desktop (please complete the following information)

  • OS: [Windows]
  • QGIS Version [3.36.0]
  • QFieldSync Version 4.9.1]

Mobile (please complete the following information)

  • Device: [e.g. Samsung Galaxy Tab Active3]
  • OS: [Android 13 OneUI 5.1.1]
  • QField version: [3.2. (72be17)]
  • Problem happens with all files and projects, not only some files or projects: [Yes/No]

[If the problem happened with QFieldCloud, please add your username and project name.]

Hello,

Is anything being done to fix this bug? I'm having exactly the same problem, and it seems I'm not the only one (see: https://www.reddit.com/r/QGIS/comments/1e5nd61/recording_photo_orientation_in_qfield/)

So to summarize, I've been taking pictures with the built-in camera in qfield, and the Exif.Image.Orientation tag always returns 0 no matter what orientation the smartphone is in when taking the picture.

For your information:
QField 3.3.10 / Qt 6.6.3
QGIS 3.34.7 on Windows 11
Smartphone Samsung A53 / Android 14 / One UI 6.1

FYI, just tried this with QField 3.3.10 on a Pixel 6A using both the native camera as well as QField's own QML-based camera and the image orientation worked out perfectly fine for me:

image

On the native camera, pixel 6A's camera app was adding the proper orientation EXIF metadata while on the non native camera, the photo itself was rotated.

Very interesting. It seems that this problem only appears on Samsung devices. I'm going to do a test with an Android other than Samsung, but I don't have one available at the moment.