react-native-image-resizer icon indicating copy to clipboard operation
react-native-image-resizer copied to clipboard

Feature request: image cropping / reshaping

Open npomfret opened this issue 9 years ago • 6 comments

Would anyone else find this useful?

npomfret avatar Aug 17 '16 13:08 npomfret

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. :)

4ian avatar Aug 17 '16 14:08 4ian

I gave up with image editor. Doesn't work well enough for my purposes.

npomfret avatar Aug 17 '16 15:08 npomfret

Out of curiosity, what was missing/not working properly?

4ian avatar Aug 17 '16 15:08 4ian

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.

npomfret avatar Aug 17 '16 15:08 npomfret

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()

jasongaare avatar Oct 07 '16 17:10 jasongaare

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?

Proberts avatar Nov 24 '16 11:11 Proberts

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.

stale[bot] avatar Sep 01 '22 21:09 stale[bot]

This issue has been automatically closed. Thank you for your contributions.

stale[bot] avatar Sep 09 '22 03:09 stale[bot]