将 Silverlight 网络摄像头图像 (ImageSource) 保存到服务器 [英] Save Silverlight webcam image (ImageSource) to Server

查看:26
本文介绍了将 Silverlight 网络摄像头图像 (ImageSource) 保存到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我得到的.我会写什么代码来将捕获的图像保存到服务器?没有任何提示输入保存位置的对话框.类似于 Facebook 的做法.(我一直无法在网上找到示例)

This is as far as I've gotten. What code would I write to save a captured image to the server? Without any dialog prompting for a save location. Similar to the way Facebook does it. (I've been unable to find examples online)

void CaptureSource_CaptureImageCompleted(object sender, CaptureImageCompletedEventArgs e)
{
    capturedImage.ImageSource = e.Result;
    stopCapture(); // turns off webcam
}

推荐答案

事情没那么简单.

  1. 在服务器上创建 WCF 服务.
  2. 在 Silverlight 客户端上使用它.
  3. 调用服务方法将图像发送到服务器.
  4. 使用自定义逻辑将其保存在服务器上.

或者,如果这太复杂 - 按照 this教程.这是一个相当紧凑的 RESTful 方法演示.

Or, if this is too complicated - follow this tutorial. It is rather compact RESTful approach demo.

这篇关于将 Silverlight 网络摄像头图像 (ImageSource) 保存到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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