如何从 .Net 世界中的网站捕获相机图像?
我有一个在线预订管理系统,需要捕获被预订到系统中的人员的图像。我目前支持从客户端计算机上的本地目录(例如 Facebook、LinkedIn 等)手动将图像上传到网站。但是,我还需要能够让客户端单击一个按钮,使他们能够使用连接到客户端计算机的相机(网络摄像头或其他方式)来拍摄快照并将其自动上传到服务器。
客户端环境是基于Windows的,我的开发环境是ASP.Net MVC 3。
是否有任何第三方ActiveX或Flash控件可以做到这一点?
I have an online booking management system that requires images to be captured of the people being booked into the system. I currently have support for uploading the images manually to the website from a local directory on the client machine (a la Facebook, LinkedIn, etc). However, I also need to be able for the client to click a button enabling them to use a camera (webcam or otherwise) hooked up to the client machine to take a snapshot and automatically upload it to the server.
The client environment is Windows based, and my development environment is ASP.Net MVC 3.
Are there any 3rd party ActiveX or Flash controls that can do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我找到了一个第三方开源 Flash + JavaScript 库,它使这个过程相当简单,称为“ jpegcam'。
以下代码是针对
Asp.Net MVC 3 (Razor View + T4MVC)
构建的。第 1 步:包含 javascript 库
第 2 步:设置 jpegcam 并连接必要的挂钩
注意:
webcam.set_api_url()
调用设置发布网址。第 3 步:连接视图中的按钮
第 4 步:创建控制器操作以服务 POST
注意:
System.Web.Helpers.WebImage
是“microsoft-web-helpers”NuGet 包的一部分。I found a 3rd party open-source Flash + JavaScript library that made this fairly simple called 'jpegcam'.
The following code is built against
Asp.Net MVC 3 (Razor View + T4MVC)
.Step 1: Include the javascript library
Step 2: Setup jpegcam and wire up the necessary hooks
Note: The
webcam.set_api_url()
call sets up the POST url.Step 3: Wire up the buttons in the view
Step 4: Create the controller action to service the POST
Note:
System.Web.Helpers.WebImage
is part of the 'microsoft-web-helpers' NuGet package.也许您可以使用 Silverlight 4 来实现此目的?版本 4 支持网络摄像头。
以下是 SilverlightShow.net 上的教程
Maybe you could use Silverlight 4 for this? Version 4 comes with support for webcams.
Here's a tutorial at SilverlightShow.net