# campi

> A NodeJS module for taking pictures with the Raspberry Pi camera module

Latest version **0.0.5** (published 2016-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install campi
pnpm add campi
yarn add campi
bun add campi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2016-01-17 |
| First published | 2015-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Werner Vesteraas |
| Maintainers | vesteraas |
| Keywords | raspistill, camera |

## Links

- npm: https://www.npmjs.com/package/campi
- Repository: https://github.com/vesteraas/campi
- Homepage: https://github.com/vesteraas/campi#readme
- Issues: https://github.com/vesteraas/campi/issues
- npm.io page: https://npm.io/package/campi

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) *

## Recent versions

- 0.0.5 (latest) — 2016-01-17
- 0.0.4 — 2015-04-25
- 0.0.3 — 2015-04-02
- 0.0.2 — 2015-04-01
- 0.0.1 — 2015-04-01

## README

campi
=====

**campi** is a [Node](http://nodejs.org/) module that encapsulates the raspistill command for taking pictures.

## Author
  - Werner Vesterås <wvesteraas@gmail.com>

## Installation
As with any Node module, use the [Node Package Manager](https://www.npmjs.com/) to install it:

```bash
$ npm install campi
```

## Usage

```javascript
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](https://github.com/vesteraas/campi/tree/master/examples) directory.

---
_Source: https://npm.io/package/campi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
