
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
node-raspistill
Advanced tools
Simple wrapper for taking photos using Raspberry Pi raspistill app.
Module is written in typescript and provides type definitions out-of-the-box.
Tested with Raspberry Pi 2 B (Raspbian OS), and Raspberry Camera Module v2.
npm install node-raspistill
const Raspistill = require('node-raspistill').Raspistill;
const camera = new Raspistill();
camera.takePhoto().then((photo) => {
...
});
Or (if you use imports):
import {Raspistill} from 'node-raspistill';
const camera = new Raspistill();
camera.takePhoto().then((photo) => {
...
});
You can also pass some options to constructor method:
const camera = new Raspistill({
verticalFlip: true,
width: 800,
height: 600
});
See full options list in the docs below.
You can also find some usage examples here: https://github.com/dlukanin/node-raspistill/tree/master/examples
Added noFileSave option. If you don't want to save photos on your raspberry pi - use this option.
Some bug fixes and new examples.
Fixed some issues with width/height options. Added setDefaultOptions method. Updated some dependencies.
Added noPreview option.
Creates new Raspistill instance.
Options - object, that can contain:
| key | type | defaults | desc |
|---|---|---|---|
| noFileSave | boolean | false | Disables photos saving. If true - camera output will be directly sent as Buffer without saving on the drive |
| verticalFlip | boolean | false | |
| horizontalFlip | boolean | false | |
| noPreview | boolean | true | Disables preview window on Pi while taking photo |
| outputDir | string | './photos' | Output directory where photos will be stored |
| fileName | string | undefined | Name for photo file. If undefined - photos file names will be calculated as new Date.now() + file encoding |
| encoding | string | 'jpg' | 'jpg', 'bpm', 'gif' or 'png' |
| width | number | undefined | Width of taken image in pixels. If width is not set - raspistill uses default max camera sensor resolution width |
| height | number | undefined | Height of taken image in pixels. If height is not set - raspistill uses default max camera sensor resolution height |
const camera = new Raspistill({
verticalFlip: true,
fileName: 'foo'
});
Takes new photo. Returns Promise, resolving with Buffer object.
camera.takePhoto('testPhotoName').then((photo) => {
...
});
Sets new options for current Raspistill instance.
camera.setOptions({
horizontalFlip: true,
noPreview: false
});
Reverts all option values of current Raspistill instance to default. Default values are presented in the options table.
Gets current raspistill options.
Gets current raspistill option by key.
FAQs
Node wrapper for taking photos using Raspberry Pi raspistill app.
We found that node-raspistill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.