Hi,
I use the Ionic Camera and Ionic ImagePicker Plugins to load images into my app. While the Camera plugin has an option ‘allowEdit’ which lets the user choose a framing, the ImagePicker does not. I was trying this solution (https://www.freakyjolly.com/ionic-4-crop-images-selected-from-image-selector-show-in-base64-format-using-native-plugins/) using the Crop Plugin. The ImagePicker is getting the File URL of the Image, but then nothing happens. The Crop Plugin doesnt even start, but I’m also not getting any error.
const options = {
maximumImagesCount: 1,
quality: 50,
};
this.imagePicker.getPictures(options)
.then((results) => {
console.log('Image URI: ' + results[0]); // This is the last Output I'm getting, then the code stops
this.crop.crop(results[0], {quality: 50, targetHeight: 500, targetWidth: 500}).then(
newImage => {
console.log('new image path is: ' + newImage);
this.convertCropToBase64(newImage);
}, (error) => {
console.log('ERROR -> ' + JSON.stringify(error));
});
}, (error) => {
console.log('ERROR -> ' + JSON.stringify(error));
});
}
does anyone have suggestions?