Open alainib opened 7 years ago
i solved the problem by using only imagePicker , they add exif in last version
openCameraCropper(){
ImagePicker.openCamera({
includeExif:true,
cropping: true,
width: 300,
height: 400,
compressImageMaxWidth: 900,
compressImageMaxHeight: 900,
compressImageQuality: 0.72
}).then(image => {
this.processDataImage(image);
});
}
openPickerCropper(){
ImagePicker.openPicker({
includeExif:true,
cropping: true,
width: 300,
height: 400,
compressImageMaxWidth: 900,
compressImageMaxHeight: 900,
compressImageQuality: 0.72
}).then(image => {
this.processDataImage(image);
});
}
processDataImage(image) {
console.log("process image 1",image);
this.setState({
currentProcessedImage: {
uid: tools.generateUUID(),
uri: image.path,
exif:image.exif,
id: this.state.imagesToSend.length
},
modalOrganeVisible: true
});
}
This is still a problem with the react-native-exif library - I can't use image-picker and do want this to work on iOS, please re-open! @alainib
Seems like it's called on the simulator when I slice out the "file:///"" at the start of a path, but not on my device. Seems like if it fails for whatever reason, it doesn't return an error but is just silent. @francisco-sanchez-molina
I'm having this same issue. Also works on the simulator (and strangely my iPhone X, but not any other iPhones). No error but doesn't call the callback. I've tried with promise and async/await. Any solutions?
I fixed this issue in my branch (PR #33) with a new method getExifWithLocalIdentifier(). There was a permission issue with getting the photo using the local path. It only showed up on some phones. The new method should work for all iOS phones though. It uses the local identifier of the photo instead of the source URL/path, if you have that available (which if your using react-native-image-crop-picker or react-native-image-picker, you should).
i get a bug on IOS , on android it work ( logs are displayed ) my problem is the getExif() don't call the callback, nothing happen.
my test code :
from camera roll it work :
what i'm trying to do is 1) to let user to choose between taking a new shoot with camera or loading one from gallery, 2) get the exif of the image 3) crop the image
did i miss something in the testfromlib function ?