What is the best way to get this library to work with perspective image cropper
See original GitHub issueHi,
I am trying to do perspective image cropping once an image is captured. The rectangle coordinates would be used as the overlay. I have tried with the react-native-perspective-image-cropper
but cannot make the crop actually work. Is there another option for perspective image cropping that can be recommended or a working example of react-native-rectangle-scanner
and ``react-native-perspective-image-cropper`? Thank you.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Has anyone gotten the react-native-perspective-image ...
Hello, I am trying to add the react-native-perspective-image-cropper on ... I have gotten the library to work on Android and crop according ...
Read more >react-native-perspective-image-cropper - npm
React native library allowing you to make custom crop and perspective corrections on photos. Latest version: 0.4.4, last published: 3 years ...
Read more >Python PIL | Image.crop() method - GeeksforGeeks
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. PIL.Image.crop() method is used to crop ...
Read more >Crop images in Photoshop Elements - Adobe Support
Cropping · Crop an image · Crop to a selection boundary · Automatic cropping suggestions · Perspective Crop tool · Use the Cookie...
Read more >react-native-perspective-image-cropper - npm package - Snyk
React native library allowing you to make custom crop and perspective corrections on photos For more information about how to use this package...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@chunkydonut21 Yes, I made a working prototype version though it is with a local version of the
react-native-perspective-image-cropper
that I have, which is based on several people fixing issues with Android compatibility and the cropper cropping inaccurately. The functioning prototype, without my local versionreact-native-perspective-image-cropper
can be found here: https://github.com/rosenexpend/rectangle-scanner-example@chunkydonut21 sorry, I spent a few minutes on this the other day and didn’t come up with something usable for you unfortunately. I think personally what I would do is actually just fork that project and simply replace the base64 return portion of that package with the file saving approach of this package.
For Android, here is the function that is called with the final image(s) and the steps I take to save them to storage before returning the URI to that saved image. https://github.com/HarvestProfit/react-native-rectangle-scanner/blob/master/android/src/main/java/com/rectanglescanner/views/RNRectangleScannerView.java#L119-L163
Here is the same for iOS: https://github.com/HarvestProfit/react-native-rectangle-scanner/blob/master/ios/RNRectangleScannerView.m#L95-L157
Like I said, everything should work the same, it’s just replacing how you interact with the image. If you get something solid working, be sure to share it as this is definitely something that people would like!