12 Star 2 Fork 0

Ligo / capture-image

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

抓拍工具

通过高拍仪的USB CAMERA通用接口完成预览和抓拍。第一步预览用image stream的方式完成 。

计划支持平台directshow/windows, avfoundation/macos。

使用方法

var Capture = require('capture_image');

var capture = Capture();
capture.add_device('liangtian');
// 或者
var capture = Capture({device: 'liangtian'});

/**
 * params:
 *   window: browser's global window
 *   document: browser's global document
 *   rotate_opt:
 * {
 *   shot: left or right or null,
 *   preview: left or right or null,
 * }
 * shot: photo taken's rotate direction
 * preview: preivewer image's rotate direction
 *
 */
capture.open(window, document, rotate_opt); // 打开预览
capture.shot();//   抓拍
capture.close(); //关闭

/**
 * params: 
 *   device {name: 'dev_name', id: number}
 *   rotate_opt {'shot': left, 'preview': right}
 */
capture.switch({name: 'Doccamera', id: 2}, {'shot': 'right'});
capture.switch();

npm 安装

npm install git+http://dev.ligotop.com/zhangheng/capture-image.git

Comments ( 0 )

Sign in for post a comment

About

使用高拍仪的USB camera接口完成预览和抓拍。 spread retract
JavaScript and 3 more languages
Cancel

Releases (3)

All

Contributors

All

Activities

load more
can not load any more
1
https://gitee.com/ligord/capture-image.git
git@gitee.com:ligord/capture-image.git
ligord
capture-image
capture-image
master

Search