Giter VIP home page Giter VIP logo

imagemin-pngquant's Introduction

imagemin-pngquant Build Status

pngquant image-min plugin

Install

$ npm install --save imagemin-pngquant

Usage

var Imagemin = require('image-min');
var pngquant = require('imagemin-pngquant');

var imagemin = new Imagemin()
	.src('foo.png')
	.dest('foo-optimized.png')
	.use(pngquant({ quality: '65-80', speed: 4 }));

imagemin.optimize();

Options

skipIfLarger

Type: Boolean
Default: true

Will skip compression if the destination image is larger than the source image.

floyd

Type: Number
Default: 0.5

Controls level of dithering (0 = none, 1 = full).

nofs

Type: Boolean
Default: false

Disable Floyd-Steinberg dithering.

posterize

Type: Number
Default: undefined

Reduce precision of the palette by number of bits. Use when the image will be displayed on low-depth screens (e.g. 16-bit displays or compressed textures).

quality

Type: String
Default: undefined

Instructs pngquant to use the least amount of colors required to meet or exceed the max quality. If conversion results in quality below the min quality the image won't be saved.

Min and max are numbers in range 0 (worst) to 100 (perfect), similar to JPEG.

speed

Type: Number
Default: 3

Speed/quality trade-off from 1 (brute-force) to 10 (fastest). Speed 10 has 5% lower quality, but is 8 times faster than the default.

verbose

Type: Boolean
Default: false

Print verbose status messages.

License

MIT © imagemin

imagemin-pngquant's People

Contributors

kevva avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.