I am trying to get the orientation of the photo taken in survey123 app in order to correct the direction of them. I have checked that with the device vertically the direction of the photo is correct, but if we touch the photo with the device horizontally, the direction is incorrect. This is because the direction is taken with respect to the longitudinal axis of the device. To correct it I've thought about using the imageorientation variable of the EXIF data, using the pulldata() function that returns the orientation of the mobile device, with values from 1 to 8:
| Flag | Orientation | Description |
|---|
| 1 | 0 degrees | the correct orientation, no adjustment is required. |
| 2 | 0 degrees, mirrored | image has been flipped back-to-front. |
| 3 | 180 degrees | image is upside down. |
| 4 | 180 degrees, mirrored | image is upside down and flipped back-to-front. |
| 5 | 90 degrees | image is on its side. |
| 6 | 90 degrees, mirrored | image is on its side and flipped back-to-front. |
| 7 | 270 degrees | image is on its far side. |
| 8 | 270 degrees, mirrored | image is on its far side and flipped back-to-front. |

but it seems that the photos taken from survey123 app do not take this value correctly, or at least that I have been able to check.
I would appreciate any indications about it. Thanks a lot.