New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i save rotate image? #209
Comments
CSS transforms aren't supported yet. |
so can i make image rotate in base64? |
The transform css is not working. Any solution??? |
@arindamm the only quick solution to this would be if you replace "CSS" for "canvas" |
Its not possible through my application. I am going to make a online story book. There user can place as many images and text as they wants. They can also scale and rotate those objects. I am using DIV tag for these. How can I create a canvas with the data of div element? Can you suggest please? |
@arindamm It was as I said at the time to save the image, var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); var rectWidth = 150; var rectHeight = 75; // translate context to center of canvas context.translate(canvas.width / 2, canvas.height / 2); // rotate 45 degrees clockwise context.rotate(Math.PI / 4); context.fillStyle = 'blue'; context.fillRect(rectWidth / -2, rectHeight / -2, rectWidth, rectHeight); Links: Note: Chrome: Firefox: Hope that helps. |
Closing this as there are multiple other issues on the same topic. |
maybe its interesting to note that rotating actually works, when you embed an image as blob... |
Even more weird: It works also without blob. My file which I got a couple of weeks ago states stat that it is 0.4.1. When building myself or installing via bower, it didn't not work. Unfortunately I don't remember where I took it, as I was just playing around... |
Content div is coming down when i am checking the checkbox by using 0.4.1 |
you can do a workaround which is told here: |
Thanks by link @jjoe64 but does not make sense to html2canvas. html2canvas is a lib for render (redraw) DOM elements (or fullpage) in canvas and no render canvas tag. Your solution work only for one element with rotation. |
yes it's not a solution that works perfect but it is a workaround for the problem, if you have to render rotated text or images. And for this use case it works perfectly in our project where we used it. |
How i can save div with CSS transform: perspective ? |
Hi everyone!
I have a question, can i save image has transform: rotate(23deg); ?
Many thanks
The text was updated successfully, but these errors were encountered: