且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在jquery中旋转图像并在jquery中保存旋转图像

更新时间:2023-12-05 16:32:40

如果图像是页面上的简单图像(img标签),并且您使用CSS3的transform rotation属性旋转,则我认为没有办法将图像另存为旋转的图像文件.但是,您可以保存CSS rotation属性的值,然后在下次有人查看该页面时使用它.

If the image is a simple image on the page (an img tag) that you rotate using the CSS3 transform rotate property I don't think there's a way to save the image as a rotated image file. But you could save the value of the CSS rotate property and then use it the next time someone views the page.

如果需要将旋转后的图像另存为文件,建议您使用HTML Canvas旋转图像并将画布的内容保存到文件中.

If you need to save the rotated image as a file, I'd suggest that you use HTML Canvas to rotate the image and the save the content of the canvas to a file:

http://creativejs.com/2012 /01/day-10-drawing-rotated-images-to-canvas/