I sent a crew out to collect data and take photos using Survey 123. The process worked great, but the crew used cell phones and took some photos with different orientations. Survey 123 doesn't reorganize and reorient the photos. Does anyone know if you can edit the orientation of the attached photos without downloading the photos and uploading back to AGOL? I wanted to create a story map from the photos but don't see an easy way to do this.
Depending on which device was used, the orientation is recorded in the metadata of the image. Try opening up the image in chrome (it takes into account this metadata).
I use a python script, using the PIL library, to automatically use this metadata to rotate them into the correct rotation.
from PIL import ExifTags, Image def rotate_image(filepath): try: image = Image.open(filepath) orientation = -1 for orientation in ExifTags.TAGS.keys(): if ExifTags.TAGS[orientation] == 'Orientation': break if orientation == -1: return exif = image._getexif() if exif is None or orientation not in exif: pass elif exif[orientation] == 3: image = image.rotate(180, expand=True) elif exif[orientation] == 6: image = image.rotate(270, expand=True) elif exif[orientation] == 8: image = image.rotate(90, expand=True) image.save(filepath) image.close() except (AttributeError, KeyError, IndexError): pass
It is device dependent though, some phones don't record it.