没有右键菜单我们可以在系统中保存画布图像 [英] can we save canvas image in system without right click menu

查看:51
本文介绍了没有右键菜单我们可以在系统中保存画布图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我已完成项目,我可以保存图像,如下载到div然后右键单击它显示另存为图像,我不想这样做。我想直接下载图像不同于上面我同时想要使用SQL服务器和mvc3 web应用程序在数据库中保存图像路径。如何保存在数据库中我需要使用任何服务器端代码。

我谷歌但却找不到任何相关的答案。

我可以问我是否可以指导我。

提前谢谢。用于保存图像

Hello I have done project in that i can save image like downloading in to div then right click on that it displays save as image,I don''t want to do like that. I want download image directly not like the above at the same time i want to save image path in database using SQL server and mvc3 web application.How to save in database I need to use any server side code.
I google it but couldn''t find any relevant answer.
Is it possible what i asked if so can any one guide me.
Thanks in advance.
below code is for saving image

function downloadCanvas() {
        var canvas = stage.children[0].canvas;
        var oImgPNG = Canvas2Image.saveAsPNG(canvas, true);
        document.body.appendChild(oImgPNG);
      }





以上代码适用于我,只需点击右键选项。

我想要直接保存图像可以任何人指导我。当我在谷歌搜索时,一个人正在使用PHP代码。

如何在html5中使用php代码。



the above code works for me with right click option.
I want to save image directly can any one guide me.When I search in google evry one is using php code.
how to use php code in html5.

推荐答案

我们可以将图像的文件路径存储在VARCHAR列中,但要确保文件位于服务器目录中
We can store the file path of the image inside a VARCHAR column, but make sure the files are inside the server directory


这篇关于没有右键菜单我们可以在系统中保存画布图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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