Comments (5)
@sharifme04 hi, thanks for writing!
What kind of rotation are you talking about?
Could you specify your use case a bit? That might help finding a solution
from react-perspective-cropper.
@giacomocerquone Hi thank you for your quick answer. I mean after taking the image when the border detect is done, then if we want we can rotate clock wise or anti clock wise based on our requirement . is it clear now ?
from react-perspective-cropper.
I hope that is not your credit card, don't post this kind of information publicly (luckily the cvv isn't shown here).
Anyway, rotation can easily be achieved once you get the scanned picture and redraw a canvas.
If you're asking if I'd like to provide a method directly inside the library as the other methods, no... this library should focus only on scanning.
If you don't want to reimplement the wheel, you can get the picture that my library gives you and then use something like: https://github.com/DominicTobias/react-image-crop#readme
from react-perspective-cropper.
HI thank you, it's my old card which is invalid, don't worry.
About the rotation, my opinion was in this should be a rotation also. but if you do not prefer it is up to you. react-cropper
, or react image crop
both are nice library but unfortunately, both of those libraries do not detect the border. react-cropper
has more options than react-image-crop
.
from react-perspective-cropper.
@sharifme04 yes I know they don't detect the border. For this reason, you can use ref.current.done({ preview: false })
which will return the cropped image and then you give the cropped image to the tool you chose to use to rotate the image
from react-perspective-cropper.
Related Issues (13)
- Add typings HOT 1
- Warning: findDOMNode is deprecated in StrictMode. HOT 1
- How to keep image color unchanged with same quality after crop ? HOT 4
- croppedRef undefined HOT 8
- backToCrop and resetting the photo to the initial one results croppedState.loading to end up true
- Provide maxHeight and maxWidth props HOT 1
- Use ctx.clip (or something else) to darken the path outside the crop area
- Add tests
- Fix example on mobile HOT 1
- Add info about loading opencv locally (why yes/why not)
- When borders aren't recognized crop points should still be shown at the corners
- Change return type and quality HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-perspective-cropper.