# jpeg-extract

> Extract image files from any jpeg stream

Latest version **3.0.1** (published 2019-01-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install jpeg-extract
pnpm add jpeg-extract
yarn add jpeg-extract
bun add jpeg-extract
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2019-01-23 |
| First published | 2016-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Ulrich Formann |
| Maintainers | ulrichformann |
| Keywords | jpg, jpeg, extract, mjpeg, mjpg, stream |

## Links

- npm: https://www.npmjs.com/package/jpeg-extract
- Repository: https://github.com/ulrichformann/jpeg-extract
- Homepage: https://github.com/ulrichformann/jpeg-extract#readme
- Issues: https://github.com/ulrichformann/jpeg-extract/issues
- npm.io page: https://npm.io/package/jpeg-extract

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.88.0

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2019-01-23
- 3.0.0 — 2019-01-22
- 1.0.4 — 2016-03-05
- 1.0.3 — 2016-03-05
- 1.0.2 — 2016-03-05
- 1.0.1 — 2016-03-05
- 1.0.0 — 2016-03-05

## README

jpeg-extract
==================

A Node module for extracting images out of jpeg/mjpeg streams

### Install

```bash
npm i jpeg-extract
yarn add jpeg-extract
```

----------------------
### Usage

```javascript
const fs = require('fs')
const extract = require('jpeg-extract')

const url = 'MJPG_URL'

extract(url, (err, img) => {
	if(!err)
		fs.writeFileSync('img.jpg', img)
	else
		console.error(err)
})
```

#### Or with promises

```javascript
const fs = require('fs')
const extract = require('jpeg-extract')

const url = 'MJPG_URL'

extract(url).then(img => {
	fs.writeFileSync('img.jpg', img)
}).catch(err => {
	console.error(err)
})
```

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