New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jpegtran

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jpegtran

The jpegtran utility as a readable/writable stream

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4K
decreased by-20.89%
Maintainers
1
Weekly downloads
 
Created
Source

node-jpegtran

NPM version Build Status Coverage Status Dependency Status

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 the node-jpegtran-bin package.

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

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):

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

License

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

Keywords

FAQs

Package last updated on 22 Nov 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc