Skip to content

webflow/imagemin-pngquant

This branch is 1 commit ahead of, 36 commits behind imagemin/imagemin-pngquant:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c6f64cd · May 25, 2016

History

78 Commits
Apr 29, 2016
Apr 29, 2016
Sep 10, 2014
Apr 29, 2016
Apr 29, 2016
Apr 29, 2016
Apr 29, 2016
May 25, 2016
Feb 9, 2015
May 25, 2016
Apr 29, 2016
Apr 29, 2016

Repository files navigation

imagemin-pngquant Build Status Build status

pngquant imagemin plugin

Install

$ npm install --save imagemin-pngquant

Usage

const imagemin = require('imagemin');
const imageminPngquant = require('imagemin-pngquant');

imagemin(['images/*.png'], 'build/images', {use: [imageminPngquant()]}).then(() => {
	console.log('Images optimized');
});

API

imageminPngquant([options])(buffer)

Returns a promise for a buffer.

options

floyd

Type: number, boolean
Default: 0.5

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

nofs

Type: boolean
Default: false

Disable Floyd-Steinberg dithering.

posterize

Type: number

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

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.

buffer

Type: buffer

Buffer to optimize.

License

MIT © imagemin

About

pngquant plugin for imagemin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%