画布以保存图像和电子邮件 [英] Canvas to Save Image and Email

查看:153
本文介绍了画布以保存图像和电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在" http://dev.ejuicysolutions.com/custom_shirt_designer/".当用户完成使用文本等格式的格式化后,他们将单击打印"按钮,可以在其中进行打印,但是我们需要将功能从打印扩展到保存图像,如Canvas中所示",然后通过电子邮件发送该图像.可以发送电子邮件,但我们面临的主要问题是图像已保存在服务器上,但其他所有格式(如文本)都没有一起保存.两种脚本都只是使用样式...在画布上方放置文本等...任何想法,如何实现?

We have a custom product designing tool at "http://dev.ejuicysolutions.com/custom_shirt_designer/". When user will be finished with formatting with text etc... they will click on print button, where they can print but we need to extend functionality from print to "Save Image, as shown in Canvas" and then email that image. Email can be done but the main problem we are facing is that image is being saved on server but all other formatting like text are not being saved along with. Either script is just placing text etc using styles... on above the canvas... Any idea, how it can be achieved?



预先感谢!



Thanks in advance!

推荐答案

如果我理解此权限,则需要将画布内容导出到图像,处于用户完成工作的状态?画布内部有一个导出功能. canvas.toDataURL().这样,您将获得base64图像,默认为png格式.

If i understand this right, you need to export the canvas content to an image, in the state it is when the user finished his work? There is an export function inside the canvas. canvas.toDataURL(). That way you get a base64 image, default is png format.

这篇关于画布以保存图像和电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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