简体   繁体   English

jQuery网络摄像头插件-如何输出更大的图像?

[英]jQuery webcam plugin - how to ouptut bigger images?

I am trying to figure out if the jQuery Webcam Plugin is capable of outputting images that are bigger than 320x240. 我试图弄清楚jQuery Webcam插件是否能够输出大于320x240的图像。

I been using the example code from the documentation ( http://www.xarg.org/project/jquery-webcam-plugin/ ) with no luck. 我一直在使用文档( http://www.xarg.org/project/jquery-webcam-plugin/ )中的示例代码,但是没有运气。

JPEGCam ( http://code.google.com/p/jpegcam/ ) is capable of outputting bigger images but unfortinately it can't use ajax to upload the image to the server like the jQuery plugin can. JPEGCam( http://code.google.com/p/jpegcam/ )能够输出更大的图像,但是不幸的是,它不能像jQuery插件那样使用ajax将图像上传到服务器。

I had the same problem: The 320x240 size is hardcoded in jscam.as (the main file for the swf binary). 我遇到了同样的问题:320x240的大小在jscam.as (swf二进制文件的主文件)中进行了硬编码。 You simply need to change those dimensions and recompile the swf. 您只需要更改这些尺寸并重新编译swf。

    // jscam.as
    166. for (var i = 0; i < 240; ++i) {
    becomes: for (var i = 0; i < Stage.height; ++i) {

    169. for (var j=0; j < 320; ++j) {
    becomes: for (var j=0; j < Stage.width; ++j) {

    166. for (var i = 0; i < 240; ++i) {
    becomes: for (var i = 0; i < Stage.height; ++i) {

    169. for (var j=0; j < 320; ++j) {
    becomes: for (var j=0; j < Stage.width; ++j) {

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM