在jquery中旋转图像并在jquery中保存旋转图像 [英] Rotate image in jquery and save rotate image in jquery

查看:229
本文介绍了在jquery中旋转图像并在jquery中保存旋转图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我有一些图像,我想旋转它们,然后保存旋转的图像.

In my application I have some images and I want to rotate them and then save the rotated images.

我已成功旋转图像,但无法保存.

I have rotated the images successfully but I could not save them.

在jQuery中是否可以保存图像?有人知道怎么做吗?

Is It possible in jQuery to save the images? Does anyone know how to do it?

推荐答案

如果图像是页面上的简单图像(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/

这篇关于在jquery中旋转图像并在jquery中保存旋转图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆