从Webcam捕获ASP.NET图像 [英] ASP.NET Image capture from Webcam

查看:72
本文介绍了从Webcam捕获ASP.NET图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!



我在一个项目上使用它,当我运行localhost时它可以工作,但是当我从servert运行时没有得到图像Flash文件。



HTML

Hello!

I'm using it on a project, and when I run localhost it works, but when I run from the serverthat does not get the image of the flash file.

HTML

<object width="395" height="180">
    <param name="movie" value="WebcamResources/save_picture.swf">
    <embed src="WebcamResources/save_picture.swf" width="395" height="180"></embed>
</object>







C#




C#

string strPhoto = Request.Form["imageData"]; //Get the image from flash file
byte[] photo = Convert.FromBase64String(strPhoto);
FileStream fs = new FileStream("C:\\Webcam.jpg", FileMode.OpenOrCreate, FileAccess.Write);
BinaryWriter br = new BinaryWriter(fs);
br.Write(photo);
br.Flush();
br.Close();
fs.Close();







我想知道是否有任何特定的配置这个解决方案是通过服务器实现的?或者另一个版本的Base64.as文件?



谢谢!




I wonder if there are any specific configuration for this solution is implementedthrough a server? or another version of the file Base64.as?

Thank you!

推荐答案

引用:



[ ^ ]





[ ^ ]





[ ^ ]







参考这些文章


[^]


[^]


[^]



refer these articles


这篇关于从Webcam捕获ASP.NET图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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