schnee effeckt und fehler Korektur
This commit is contained in:
89
node_modules/imagemin-optipng/readme.md
generated
vendored
89
node_modules/imagemin-optipng/readme.md
generated
vendored
@@ -1,50 +1,47 @@
|
||||
# imagemin-optipng [](https://travis-ci.org/imagemin/imagemin-optipng) [](https://ci.appveyor.com/project/ShinnosukeWatanabe/imagemin-optipng)
|
||||
# imagemin-optipng [](https://travis-ci.org/imagemin/imagemin-optipng)
|
||||
|
||||
> optipng image-min plugin
|
||||
> Imagemin plugin for OptiPNG
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save imagemin-optipng
|
||||
$ npm install imagemin-optipng
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var Imagemin = require('imagemin');
|
||||
var imageminOptipng = require('imagemin-optipng');
|
||||
const imagemin = require('imagemin');
|
||||
const imageminOptipng = require('imagemin-optipng');
|
||||
|
||||
new Imagemin()
|
||||
.src('images/*.png')
|
||||
.dest('build/images')
|
||||
.use(imageminOptipng({optimizationLevel: 3}))
|
||||
.run();
|
||||
```
|
||||
(async () => {
|
||||
await imagemin(['images/*.png'], 'build/images', {
|
||||
use: [
|
||||
imageminOptipng()
|
||||
]
|
||||
});
|
||||
|
||||
You can also use this plugin with [gulp](http://gulpjs.com):
|
||||
|
||||
```js
|
||||
var gulp = require('gulp');
|
||||
var imageminOptipng = require('imagemin-optipng');
|
||||
|
||||
gulp.task('default', function () {
|
||||
return gulp.src('images/*.png')
|
||||
.pipe(imageminOptipng({optimizationLevel: 3})())
|
||||
.pipe(gulp.dest('build/images'));
|
||||
});
|
||||
console.log('Images optimized!');
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### imageminOptipng(options)
|
||||
### imageminOptipng(options?)(buffer)
|
||||
|
||||
#### options.optimizationLevel
|
||||
Returns a `Promise<Buffer>`.
|
||||
|
||||
Type: `number`
|
||||
Default: `2`
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### optimizationLevel
|
||||
|
||||
Type: `number`<br>
|
||||
Default: `3`
|
||||
|
||||
Select an optimization level between `0` and `7`.
|
||||
|
||||
@@ -60,7 +57,43 @@ Level and trials:
|
||||
6. 120 trials
|
||||
7. 240 trials
|
||||
|
||||
##### bitDepthReduction
|
||||
|
||||
## License
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
MIT © [imagemin](https://github.com/imagemin)
|
||||
Apply bit depth reduction.
|
||||
|
||||
##### colorTypeReduction
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Apply color type reduction.
|
||||
|
||||
##### paletteReduction
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Apply palette reduction.
|
||||
|
||||
##### interlaced
|
||||
|
||||
Type: `boolean | undefined | null`<br>
|
||||
Default: `false`
|
||||
|
||||
Enable [Adam7](https://en.wikipedia.org/wiki/Adam7_algorithm) PNG interlacing on any images that are processed. Interlaced images look better when they're loaded partially, but usually interlace makes compression less efficient. Set to `undefined` or `null` to keep the same interlacing as the input image.
|
||||
|
||||
##### errorRecovery
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
A reasonable amount of effort will be spent to try to recover as much data as possible of a broken image, but the success cannot generally be guaranteed.
|
||||
|
||||
#### buffer
|
||||
|
||||
Type: `Buffer`
|
||||
|
||||
Buffer to optimize.
|
||||
|
||||
Reference in New Issue
Block a user