Comments (3)
Hey @djfdev
I'm using this library and doing rotation as well. I created a rotation button that rotates by -90 deg (although you could create a slider or other controller that does in smaller increments). I then update my rotation in state and pass that through to the ReactCrop component as imageStyle props. If I pass a {transform: 'rotate(' + this.state.rotation + 'deg)'}
to the imageStyle props on the ReactCrop component, it works pretty well.
Hope this helps!
from react-image-crop.
Hi @djfdev, sorry but this is indeed beyond the scope of this library. It's too specific a use-case and I don't have the inclination to support that much of an extended feature set tbh. But if I was you I would create a higher order component (one which wraps this one or another lib) and adds that prop and does what you desire, it sounds like it could be pretty agnostic of the actual cropping component which sits underneath so that could be swapped out if ever needed.
from react-image-crop.
Hi.. I am having functionality of crop and rotate an image using this package and I am getting the cropped image url using
"canvas.toDataURL("image/jpeg", 1)". I am generating this url to display the cropped image. But the issue I am facing is that while rotating, I have to maintain the rotation degree state in my Component. But instead, I want to add the rotation property in the imag url itself that I am generating since I need to pass this url to the backend.. Does anyone have a solution to this requirement?
Thanks in advance
from react-image-crop.
Related Issues (20)
- Setting unit % automatically changed to px after the crop HOT 2
- the crop div is created below the image and it is invisible HOT 1
- Preview Canvas resolution is huge. HOT 4
- ReactCrop__child-wrapper's width is differ by browser HOT 2
- Not able to catch exact crop image HOT 1
- outline is not circled with circularCrop in safari browser HOT 1
- ログイン、新規ユーザー作成処理の実装
- when we have circularCrop as prop, how to set the points on circle? HOT 3
- Need to rotate selected(croped) image HOT 4
- Synchronization Issue Between Multiple Cropper Instances on the Same Page HOT 2
- Image Cropping with 8/3 Aspect Ratio Causing Loss of Half Portion After Retrieval for s3 HOT 2
- Canvas toBlob crop not working on Sandbox (iOS) HOT 3
- Crop mask stays present with zero-size crop HOT 1
- SecurityError: OffscreenCanvas.convertToBlob: Cannot get blob from write-only canvas. HOT 1
- Canvas returns null after cropping image iOS HOT 1
- Mask is does'nt showing the first time HOT 6
- Memory leak risk due to event listeners not removed on componentWillUnmount HOT 1
- mask does not fully cover the image when the image to a smaller aspect ratio HOT 2
- Multiple crop selection on an image at the same time HOT 1
- Can the cropper be used for outpainting?
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-image-crop.