I am running the below code to attempt to resize the photo that is taken in the CameraView. However when I test via iPhone in XCode I get a SIGABRT error message and the app crashes. Any help or direction is appreciated.
function capturePhoto() {
Camera.capturePhoto()
.then(function (photo) {
photo.save()
.then(function(filePath) {
var options = {
mode: ImageTools.IGNORE_ASPECT,
desiredWidth: 320, //The desired width in pixels
desiredHeight: 240 //The desired height in pixels
};
ImageTools.resize(photo, options)
console.log("Photo saved to: " + filePath);
var arrayBuff = FileSystem.readBufferFromFileSync(filePath);
b64data = Base64.encodeBuffer(arrayBuff); // send this to the backend
photo.release();
})
.catch(function(error) {
console.log("Failed to save photo: " + error);
photo.release();
});
})
.catch(function (error) {
console.log("Failed to capture photo: " + error);
});
}