Setting exif to true resulting in incorrect picture orientation

130 views Asked by At

I'm trying to add exif data for GPS location to images that I'm capturing using expo-camera.

 import { Camera, CameraType } from "expo-camera";
 
 const [camera, setCamera] = useState<Camera | null>(null);

 const takePicture = async () => {
    const data = await camera.takePictureAsync({
       exif: true,
       additionalExif: {
         GPSLatitude: 0,
         GPSLongitude: 0,
         GPSAltitude: 0,
       },
     });
  }

 ...

 <Camera
    ref={(ref) => setCamera(ref)}
    type={CameraType.back}
    ratio="4:3"
  />

When I set exif to true, the orientation of pictures I take in portrait mode are rotated 90 degrees. There is no issue with the orientation when exif is not set to true. Setting skipProcessing to true seems to fix the orientation, but the additional exif data is not added. I'm using a Nokia 7.1.

0

There are 0 answers