react-native-image-resizer
react-native-image-resizer copied to clipboard
Feature request: image cropping / reshaping
Would anyone else find this useful?
For a project, we have been using ImageEditor from React Native 😃 https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageEditor.js
Documentation is pretty scarce though! But works well. :)
I gave up with image editor. Doesn't work well enough for my purposes.
Out of curiosity, what was missing/not working properly?
On iOS it doesn't give you url to the file, but instead stores the data in memory (base64 encoded). I need the binary data, and storing an image like that in memory can easily blow up your app. The behaviour between android and iOS was worryingly different. It doesn't support compression. It doesn't support GIFs.
I'd certainly be interested in even the option to select an aspect ratio for resizing. Namely, when I need a 16:9 but the native camera takes 4:3, it would be super helpful and allow me to skip using ImageEditor.cropImage()
I'm going to need cropping functionality and looking at the Android source it should be trivial to implement. There's a method on Android's bitmap class that takes a transformation matrix and also includes crop parameters. If I add cropping on Android and submit a pull request, is there someone who wants to look at adding it for iOS?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed. Thank you for your contributions.