react-native-exify icon indicating copy to clipboard operation
react-native-exify copied to clipboard

writeAsync() does not respect direction of latitude/longitude

Open orientalperil opened this issue 8 months ago • 0 comments

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)

orientalperil avatar Mar 24 '25 00:03 orientalperil