react-native-exify
react-native-exify copied to clipboard
writeAsync() does not respect direction of latitude/longitude
I'm having an issue where GPSLongitudeRef is ignored. I read the metadata from a photo from a camera component and then write it to another file. The new file has the wrong GPSLongitudeRef. Developing on iOS.
GPSLongitudeRef in my photo is 'W' and GPSLongitude is a positive number. When I try to write this, GPSLongitudeRef changes into 'E'. I was able to work around this by changing GPSLongitude to a negative number if GPSLongitudeRef is 'W'.
import {readAsync, writeAsync} from '@lodev09/react-native-exify'
let exifData = await readAsync(photo.path)
let uri = `${FileSystem.documentDirectory}/file.jpg`
await writeAsync(uri, exifData)