如何从网络摄像头获取照片并将其存储到ASP.NET 4.0中的varbinary列中

我只想拍照留学生(学校管理部门)。我无法从网络摄像头拍照。页面上没有效果。

<script src="Webcam_Plugin/jquery.webcam.js" type="text/javascript"></script>
    <script type="text/javascript">
        var pageUrl = "student_admision.aspx";
        $(function () {
            jQuery("#webcam").webcam({
                width: 320,height: 240,mode: "save",swffile: "Webcam_Plugin/jscam.swf",debug: function (type,status) {
                    $('#camStatus').append(type + ": " + status + '<br /><br />');
                },onSave: function (data) {
                    $.ajax({
                        type: "POST",url: pageUrl + "/getcapturedImage",data: '',contentType: "application/json; charset=utf-8",dataType: "json",success: function (r) {
                            //$("[id*=imgCapture]").css("visibility","visible");
                            //$("[id*=imgCapture]").attr("src",r.d);
                            var img = new Image();
                            img.src = r.d;
                            img.onload = function () {
                                $("[id*=imgCapture]")[0].src = img.src;
                                $("[id*=imgCapture]").show();
                                $("#imgLoader").hide();
                            };

                        },failure: function (response) {
                            alert(response.d);
                        }
                    });
                },onCapture: function () {
                    webcam.save(pageUrl);
                }
            });
        });
        function Capture() {
            $("#imgLoader").show();
            $("[id*=imgCapture]").hide();
            webcam.capture();
            return false;
        }
    </script>

但是我的页面上没有出现flash对象。谁能推荐我最好的文章?

fenglongwei 回答:如何从网络摄像头获取照片并将其存储到ASP.NET 4.0中的varbinary列中

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3135694.html

大家都在问