[英]Send canvas image to server and return processed image from server to client to display
I am trying to upload canvas image from client to server and then after processing sending this processed image back to client to display it again on same canvas. 我正在尝试将画布图像从客户端上载到服务器,然后在将处理后的图像发送回客户端以进行处理之后,再次将其显示在同一画布上。 I am able to upload the canvas Image by using Canvas DataURL. 我可以使用Canvas DataURL上传画布图像。 Here is the link thst I followed - Saving HTML 5 Canvas as Image on the server using ASP.NET 这是我关注的链接- 使用ASP.NET在服务器上将HTML 5 Canvas保存为图像
After uploading I saved the image and did some processing on it. 上传后,我保存了图像并对其进行了一些处理。 Now how can I send this processed image back to client to display it again on canvas. 现在如何将处理后的图像发送回客户端以再次显示在画布上。
I am new to HTML5 and asp.net mvc 我是HTML5和asp.net mvc的新手
If you want to send the image back from the server to the client, you should use SignalR (or another framework/library which implements websockets). 如果要将图像从服务器发送回客户端,则应使用SignalR(或其他实现websocket的框架/库)。 The other way is to request the image from the server, but you have to be sure that the webserver has finished processing the image. 另一种方法是从服务器请求图像,但是您必须确保Web服务器已完成图像处理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.