Skip to content

A node module that encapsulate the raspistill command for taking pictures

Notifications You must be signed in to change notification settings

vesteraas/campi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

campi

campi is a Node module that encapsulates the raspistill command for taking pictures.

Author

Installation

As with any Node module, use the Node Package Manager to install it:

$ npm install campi

Usage

var Campi = require('campi');

var campi = new Campi();

campi.getImageAsStream({ /* options */ }, function (err, stream) {
    if (err) {
        throw err;
    }
    // use stream object
});

campi.getImageAsFile({ /* options */ }, './filename.jpg', function (err) {
    if (err) {
        throw err;
    }
    // use file
});

The options object supports the following properties:

Option Value
width, w Width
height, h Height
encoding, e File encoding (jpg, bmp, gif, png)
shutter, sh Shutter speed (>=0, <=6000000)
nopreview, n  No preview (true / false)
opacity, op Opacity (>=0, <=255)
imxfx, ifx Image effect (none, negative, solarise, posterise, whiteboard, blackboard, sketch, denoise, emboss, oilpaint, hatch, gpen, pastel, watercolour, film, blur, saturation)
metering, mm Metering mode (average, spot, backlit, matrix)
quality, q Quality (>=0, <=100)
timeout, t Timeout
hflip, hf Horizontal flip
vflip, vf Vertical flip
rotation, rot degrees the picture will be rotated - integer 0<value<360
preview, prev size and position of the preview while capturing. fullscreen horizontal, fullscreen vertical, middle screen vertical ('0,0,1920,1080','0,0,1080,1920','0,608,1080,608')

Examples

See the examples directory.

About

A node module that encapsulate the raspistill command for taking pictures

Resources

Stars

Watchers

Forks

Packages

No packages published