简体   繁体   English

将画布图像发送到服务器,并将处理后的图像从服务器返回到客户端以显示

[英]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.

相关问题 在页面上将图像从服务器发送到画布 - Send an image from server to canvas on a page 使用REST API将图像从服务器发送到客户端 - send image from server to client with REST API 将处理后的图像上传到服务器 - upload a processed image into server 通过传递从画布生成的datURL将图像发送到服务器 - send image to server by passing datURL generated from canvas 如何将jpeg文件从服务器上的文件夹发送到客户端并在Image元素中显示它? - How to Send a jpeg File from a Folder on Server to the Client and Display It in an Image element? 将画布调整为更大的图像并将其发送到服务器 - Resize canvas to bigger image and send it to the server 如何让我的代码等到我从服务器获得处理过的图像以在 Javascript 中显示 - How can I make my code wait until I got processed image from the server to display in Javascript 从JavaScript客户端向SQL Server发送图像的最佳格式 - Best format to send image from javascript client to SQL server 将图像从websocket服务器.NET发送到客户端(HTML5) - send image from websocket server .NET to client (HTML5) 如何将图像从桌面(客户端)发送到服务器,反之亦然 - How to send an image from desktop(client) to server & vice versa
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM