React-Native-Crop-Image doesn't work on android, how to crop image on android and should be the same for ios


u

I have tried this library react-native-image-crop-picker as suggested in this stackoverflow answer

I followed every step mentioned here

  1. runnpm i [email protected]
  2. import ImagePicker from 'react-native-image-crop-picker';Then

ImagePicker.openPicker({width: 300, height: 400, crop: true}). then(image => {console.log(image);});

Also // file: android/settings.gradleadded the following code

包括':react-native-image-crop-picker'project(':react-native-image-crop-picker')。projectDir = new File(settingsDir,'../node_modules/react-native-image-crop-选择器/ Android')

Also, as stated in the documentation , the required code has been added in the & filebuild.gradleMainActivity.java

But it doesn't work for me, it works Androidperfectly iOS. When turned on, AndroidI can only crop the image by proportional type, not flexible cropping.

triple

I think you are already having a version problem. You should try react-native-amazing-cropper . Yes Androidand both are the same iOS.

Related


How to crop an image in Android?

username Actually, now I'm going to move on to the crop part, because I need to crop the image on all four sides of the height and width, but I can't choose the height used for this tutorial. http://www.coderzheaven.com/2012/12/15/crop-image-android/ What I ne

React Native: Image crop picker crashes app Android

Chen Daruan I use react-native-fs to download an image from a server and then crop it using openCropper() from react-native-image-crop-picker. It works fine in iOS, however, it crashes on Android without any error messages or alerts. Are you on this issue? giv

Crop doesn't work if image is data

Siyavash Khojasteh I want to crop an image when the user uploads it, and after cropping I want to save it in the database. I want to use cropper or cropperjs to do this. If I use the image from the server, everything is fine, but when I want to use the uploade

Crop doesn't work if image is data

Siyavash Khojasteh I want to crop an image when the user uploads it, and after cropping I want to save it in the database. I want to use cropper or cropperjs to do this. If I use the image from the server, everything is fine, but when I want to use the uploade

Image crop editor doesn't work

master mix I'm having a problem in the WordPress admin, the image is not cropping in WP "Edit Image" of the site I'm creating, and I don't know why. I've read some similar topics, but nothing seems to work. I've deactivated all plugins and checked the server,

How to Crop an Image in iOS

fly3 I have a photo app where you can add stickers. When done, I want to save the image. Here is the code I am going to do. if(UIGraphicsBeginImageContextWithOptions != NULL) { UIGraphicsBeginImageContextWithOptions(self.view.frame.size, YES, 2.5); } else

How to Crop an Image in iOS

fly3 I have a photo app where you can add stickers. When done, I want to save the image. Here is the code I am going to do. if(UIGraphicsBeginImageContextWithOptions != NULL) { UIGraphicsBeginImageContextWithOptions(self.view.frame.size, YES, 2.5); } else

How to Crop an Image in iOS

fly3 I have a photo app where you can add stickers. When done, I want to save the image. Here is the code I am going to do. if(UIGraphicsBeginImageContextWithOptions != NULL) { UIGraphicsBeginImageContextWithOptions(self.view.frame.size, YES, 2.5); } else

Crop image to square - Android

Noriko How to cut a rectangular image (600 x 300) from left and right to fit a square ImageView? I don't want to resize the image, I just want to crop it to 300 x 300. [untie] As @blackbelt said Bitmap cropImg = Bitmap.createBitmap(src, startX, startY, dstWidt

Crop image to square - Android

Noriko How to cut a rectangular image (600 x 300) from left and right to fit a square ImageView? I don't want to resize the image, I just want to crop it to 300 x 300. [untie] As @blackbelt said Bitmap cropImg = Bitmap.createBitmap(src, startX, startY, dstWidt

Crop image in ImageView android

Ishaan Kumar I set the image with src tag in ImageView. The problem is on some devices (my Moto E2) the image is displayed correctly, but on the device (my Xiaomi Redmi 1s) the image is cropped to a black background. I don't understand why this is happening. I

Crop image to square - Android

Noriko How to cut a rectangular image (600 x 300) from left and right to fit a square ImageView? I don't want to resize the image, I just want to crop it to 300 x 300. [untie] As @blackbelt said Bitmap cropImg = Bitmap.createBitmap(src, startX, startY, dstWidt

Crop image in ImageView android

Ishaan Kumar I set the image with src tag in ImageView. The problem is on some devices (my Moto E2) the image is displayed correctly, but on the device (my Xiaomi Redmi 1s) the image is cropped to a black background. I don't understand why this is happening. I

Crop image to square - Android

Noriko How to cut a rectangular image (600 x 300) from left and right to fit a square ImageView? I don't want to resize the image, I just want to crop it to 300 x 300. [untie] As @blackbelt said Bitmap cropImg = Bitmap.createBitmap(src, startX, startY, dstWidt

Python PIL crop doesn't crop the image

throw I have the following function to crop the image: def crop(original_image): original_image = Image.open(original_image) original_image.crop((25, 25, 50, 50)) #original_image.load() thumb_io = StringIO.StringIO() original_image.save(

Xamarin ios crop image (like Android)

Albert Cortada I am using xamarin iOS. I want to take a picture and then let the user crop the image to whatever size he wants, for example in android: or display in gallery like in other questions: iOS - How to achieve cropped image like default photo album?

Xamarin ios crop image (like Android)

Albert Cortada I am using xamarin iOS. I want to take a picture and then let the user crop the image to whatever size he wants, for example in android: or display in gallery like in other questions: iOS - How to achieve cropped image like default photo album?

Paperclip doesn't crop image

Ruba Ruba I am trying to add attachments to my post model I have used paperclip, but in this case, there is a strange problem, if I set the paperclip will not work :styles, when I try to save, it is rendering the message check the problem below, but there is n

Paperclip doesn't crop image

Ruba Ruba I am trying to add attachments to my post model I have used paperclip, but in this case, there is a strange problem, if I set the paperclip will not work :styles, when I try to save, it is rendering the message check the problem below, but there is n

How to crop image based on rectangle in Android?

Javier One I'm implementing a custom camera, in a layout, inside the layout there is a rectangle where the user has to place a card, so after taking a photo, I need to crop the picture, taking the rectangle as a reference. Any suggestions on how to do this? Tr

How to crop image based on rectangle in Android?

Javier One I'm implementing a custom camera, in a layout, inside the layout there is a rectangle where the user has to place a card, so after taking a photo, I need to crop the picture, taking the rectangle as a reference. Any suggestions on how to do this? Tr