# jpegtran

> The jpegtran utility as a readable/writable stream

Latest version **2.0.0** (published 2020-11-22) · BSD-3-Clause license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-11-22 |
| First published | 2012-12-01 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 136 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Andreas Lind |
| Maintainers | papandreou |
| Keywords | jpegtran, jpeg, jpg, image, optimization, stream, filter, read/write, duplex |

## Links

- npm: https://www.npmjs.com/package/jpegtran
- Repository: https://github.com/papandreou/node-jpegtran
- Homepage: https://github.com/papandreou/node-jpegtran#readme
- Issues: https://github.com/papandreou/node-jpegtran/issues
- npm.io page: https://npm.io/package/jpegtran

## Dependencies (3)

- [which](https://npm.io/package/which.md) ^2.0.1
- [jpegtran-bin](https://npm.io/package/jpegtran-bin.md) ^5.0.1
- [memoizeasync](https://npm.io/package/memoizeasync.md) ^1.0.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

- 2.0.0 (latest) — 2020-11-22
- 1.1.0 — 2020-07-22
- 1.0.6 — 2019-03-03
- 1.0.5 — 2017-02-08
- 1.0.4 — 2016-03-31
- 1.0.3 — 2016-03-31
- 1.0.2 — 2016-03-31
- 1.0.1 — 2016-03-31
- 1.0.0 — 2016-03-31
- 0.2.0 — 2015-07-28
- 0.1.0 — 2014-09-22
- 0.0.6 — 2014-05-27
- 0.0.5 — 2014-03-24
- 0.0.4 — 2012-12-11
- 0.0.3 — 2012-12-10
- … 2 more at https://npm.io/package/jpegtran/versions

## README

# node-jpegtran

[![NPM version](https://badge.fury.io/js/jpegtran.svg)](http://badge.fury.io/js/jpegtran)
[![Build Status](https://travis-ci.org/papandreou/node-jpegtran.svg?branch=master)](https://travis-ci.org/papandreou/node-jpegtran)
[![Coverage Status](https://coveralls.io/repos/papandreou/node-jpegtran/badge.svg)](https://coveralls.io/r/papandreou/node-jpegtran)
[![Dependency Status](https://david-dm.org/papandreou/node-jpegtran.svg)](https://david-dm.org/papandreou/node-jpegtran)

The jpegtran command line utility as a readable/writable stream.

If you don't have a `jpegtran` binary in your PATH, `node-jpegtran`
will try to use one of the binaries provided by <a
href="https://github.com/yeoman/node-jpegtran-bin">the node-jpegtran-bin
package</a>.

The constructor optionally takes an array of command line options for
the `jpegtran` binary:

```javascript
var JpegTran = require('jpegtran'),
  myJpegTranslator = new JpegTran(['-rotate', 90, '-progressive']);

sourceStream.pipe(myJpegTranslator).pipe(destinationStream);
```

JpegTran as a web service (sends back a horizontally flipped grayscale
version of the request body):

```javascript
var JpegTran = require('jpegtran'),
  http = require('http');

http
  .createServer(function (req, res) {
    if (req.headers['content-type'] === 'image/jpeg') {
      res.writeHead(200, { 'Content-Type': 'image/jpeg' });
      req.pipe(new JpegTran(['-grayscale', '-flip', 'horizontal'])).pipe(res);
    } else {
      res.writeHead(400);
      res.end('Feed me a JPEG!');
    }
  })
  .listen(1337);
```

## Installation

Make sure you have node.js and npm installed, then run:

```
npm install jpegtran
```

## Releases

[Changelog](https://github.com/papandreou/node-jpegtran/blob/master/CHANGELOG.md)

## License

3-clause BSD license -- see the `LICENSE` file for details.

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