Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Picture metadata is lost after using CameraRoll.save

$
0
0

I am using RNCamera to take pictures and write metadata in it , the only problem is that RNCamera saves the pictures in the app cache . so i used react-native-community/cameraroll library to save the taken picture to the cameraRoll ,the main problem here is that the saved picture in cameraRoll is missing the metadata that was written with RNCamera .is there a work around this ? am i missing an option in camreaRoll.save ?below is my code

    export const startShootPhoto = async sensorState => {     const camera = await getCameraRef();        if (camera) {         const location = {         GPSLongitude: get("longitude", sensorState),         GPSLatitude: get("altitude", sensorState),         GPSAltitude: get("altitude", sensorState)        };     const options = {      quality: 0.5,      base64: true,      exif: true,      writeExif: location     };     const data = await camera.takePictureAsync(options);     await CameraRoll.save(get("uri", data), {      type: "photo",      album: "test"     });    }  };

Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>