diff --git a/README.md b/README.md index 98301ad9..30fb5e18 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ the installation of any external runtime dependencies. ## Examples ```javascript -import sharp from 'sharp'; +const sharp = require('sharp'); ``` ```javascript @@ -33,8 +33,6 @@ sharp(inputBuffer) // A Promises/A+ promise is returned when callback is not provided. ``` - - ```javascript sharp('input.jpg') .rotate() diff --git a/docs/api-output.md b/docs/api-output.md index f992c238..1a2b03d4 100644 --- a/docs/api-output.md +++ b/docs/api-output.md @@ -29,6 +29,7 @@ A Promises/A+ promise is returned when `callback` is not provided. - `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)?** called on completion with two arguments `(err, info)`. `info` contains the output image `format`, `size` (bytes), `width`, `height`, `channels` and `premultiplied` (indicating if premultiplication was used). + When using a crop strategy also contains `cropOffsetLeft` and `cropOffsetTop`. - Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** Invalid parameters @@ -102,8 +103,8 @@ Use these PNG options for output image. - `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** - `options.progressive` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** use progressive (interlace) scan (optional, default `false`) - - `options.compressionLevel` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** zlib compression level (optional, default `6`) - - `options.adaptiveFiltering` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** use adaptive row filtering (optional, default `true`) + - `options.compressionLevel` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** zlib compression level, 0-9 (optional, default `9`) + - `options.adaptiveFiltering` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** use adaptive row filtering (optional, default `false`) - `options.force` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** force PNG output, otherwise attempt to use input format (optional, default `true`) diff --git a/docs/index.md b/docs/index.md index 555b1b71..c81b6895 100644 --- a/docs/index.md +++ b/docs/index.md @@ -55,9 +55,9 @@ without having to use separate command line tools like [jpegoptim](https://github.com/tjko/jpegoptim) and [jpegtran](http://jpegclub.org/jpegtran/). -PNG filtering can be disabled, +PNG filtering is disabled by default, which for diagrams and line art often produces the same result -as [pngcrush](http://pmt.sourceforge.net/pngcrush/). +as [pngcrush](https://pmt.sourceforge.io/pngcrush/). ### Contributing diff --git a/docs/install.md b/docs/install.md index 289938e9..ffecfa79 100644 --- a/docs/install.md +++ b/docs/install.md @@ -16,7 +16,7 @@ yarn add sharp ### Linux -[![Ubuntu 14.04 Build Status](https://travis-ci.org/lovell/sharp.png?branch=master)](https://travis-ci.org/lovell/sharp) +[![Ubuntu 16.04 Build Status](https://travis-ci.org/lovell/sharp.png?branch=master)](https://travis-ci.org/lovell/sharp) [![Linux Build Status](https://circleci.com/gh/lovell/sharp.svg?style=svg&circle-token=6cb6d1d287a51af83722b19ed8885377fbc85e5c)](https://circleci.com/gh/lovell/sharp) libvips and its dependencies are fetched and stored within `node_modules/sharp/vendor` during `npm install`. @@ -25,13 +25,13 @@ This involves an automated HTTPS download of approximately 7MB. Most recent Linux-based operating systems with glibc running on x64 and ARMv6+ CPUs should "just work", e.g.: * Debian 7, 8 -* Ubuntu 12.04, 14.04, 16.04 +* Ubuntu 14.04, 16.04 * Centos 7 * Fedora * openSUSE 13.2 * Archlinux * Raspbian Jessie -* Amazon Linux 2016.03, 2016.09 +* Amazon Linux 2017.03.1 * Solus To use a globally-installed version of libvips instead of the provided binaries, @@ -78,7 +78,7 @@ that it can be located using `pkg-config --modversion vips-cpp`. [![Windows x64 Build Status](https://ci.appveyor.com/api/projects/status/pgtul704nkhhg6sg)](https://ci.appveyor.com/project/lovell/sharp) libvips and its dependencies are fetched and stored within `node_modules\sharp\vendor` during `npm install`. -This involves an automated HTTPS download of approximately 11MB. +This involves an automated HTTPS download of approximately 12MB. Only 64-bit (x64) `node.exe` is supported. diff --git a/package.json b/package.json index d9052ba9..98960142 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "devDependencies": { "async": "^2.5.0", "cc": "^1.0.1", - "documentation": "^4.0.0-rc.1", + "documentation": "^5.3.2", "exif-reader": "^1.0.2", "icc": "^1.0.0", "mocha": "^3.5.0",