Small improvements to input and install docs, bump deps

This commit is contained in:
Lovell Fuller 2019-03-15 15:48:55 +00:00
parent 54e5514b9a
commit 6387fb79b1
4 changed files with 16 additions and 15 deletions

View File

@ -22,7 +22,7 @@ Returns **Sharp**
## metadata ## metadata
Fast access to (uncached) image metadata without decoding any compressed image data. Fast access to (uncached) image metadata without decoding any compressed image data.
A Promises/A+ promise is returned when `callback` is not provided. A `Promise` is returned when `callback` is not provided.
- `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg` - `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
- `size`: Total size of image in bytes, for Stream and Buffer input only - `size`: Total size of image in bytes, for Stream and Buffer input only
@ -70,7 +70,7 @@ Returns **([Promise][5]<[Object][6]> | Sharp)**
## stats ## stats
Access to pixel-derived image statistics for every channel in the image. Access to pixel-derived image statistics for every channel in the image.
A Promise is returned when `callback` is not provided. A `Promise` is returned when `callback` is not provided.
- `channels`: Array of channel statistics for each channel in the image. Each channel statistic contains - `channels`: Array of channel statistics for each channel in the image. Each channel statistic contains
- `min` (minimum value in the channel) - `min` (minimum value in the channel)
@ -105,9 +105,9 @@ Returns **[Promise][5]<[Object][6]>**
## limitInputPixels ## limitInputPixels
Do not process input images where the number of pixels (width _ height) exceeds this limit. Do not process input images where the number of pixels (width x height) exceeds this limit.
Assumes image dimensions contained in the input metadata can be trusted. Assumes image dimensions contained in the input metadata can be trusted.
The default limit is 268402689 (0x3FFF _ 0x3FFF) pixels. The default limit is 268402689 (0x3FFF x 0x3FFF) pixels.
### Parameters ### Parameters

View File

@ -36,7 +36,7 @@ Building from source requires:
[![Ubuntu 16.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)
libvips and its dependencies are fetched and stored within `node_modules/sharp/vendor` during `npm install`. libvips and its dependencies are fetched and stored within `node_modules/sharp/vendor` during `npm install`.
This involves an automated HTTPS download of approximately 8MB. This involves an automated HTTPS download of approximately 9MB.
Most Linux-based (glibc, musl) operating systems running on x64 and ARMv6+ CPUs should "just work", e.g.: Most Linux-based (glibc, musl) operating systems running on x64 and ARMv6+ CPUs should "just work", e.g.:
@ -86,7 +86,7 @@ via `sharp.cache(false)` to avoid a stack overflow.
[![OS X 10.12 Build Status](https://travis-ci.org/lovell/sharp.png?branch=master)](https://travis-ci.org/lovell/sharp) [![OS X 10.12 Build Status](https://travis-ci.org/lovell/sharp.png?branch=master)](https://travis-ci.org/lovell/sharp)
libvips and its dependencies are fetched and stored within `node_modules/sharp/vendor` during `npm install`. libvips and its dependencies are fetched and stored within `node_modules/sharp/vendor` during `npm install`.
This involves an automated HTTPS download of approximately 7MB. This involves an automated HTTPS download of approximately 8MB.
To use your own version of libvips instead of the provided binaries, make sure it is To use your own version of libvips instead of the provided binaries, make sure it is
at least the version listed under `config.libvips` in the `package.json` file and at least the version listed under `config.libvips` in the `package.json` file and
@ -97,8 +97,9 @@ 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) [![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`. libvips and its dependencies are fetched and stored within `node_modules\sharp\vendor` during `npm install`.
This involves an automated HTTPS download of approximately 13MB. If you are having issues during This involves an automated HTTPS download of approximately 14MB.
installation consider removing the directory ```C:\Users\[user]\AppData\Roaming\npm-cache\_libvips```. If you are having issues during installation consider removing the directory
`C:\Users\[user]\AppData\Roaming\npm-cache\_libvips`.
Only 64-bit (x64) `node.exe` is supported. Only 64-bit (x64) `node.exe` is supported.

View File

@ -174,7 +174,7 @@ function clone () {
/** /**
* Fast access to (uncached) image metadata without decoding any compressed image data. * Fast access to (uncached) image metadata without decoding any compressed image data.
* A Promises/A+ promise is returned when `callback` is not provided. * A `Promise` is returned when `callback` is not provided.
* *
* - `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg` * - `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
* - `size`: Total size of image in bytes, for Stream and Buffer input only * - `size`: Total size of image in bytes, for Stream and Buffer input only
@ -255,7 +255,7 @@ function metadata (callback) {
/** /**
* Access to pixel-derived image statistics for every channel in the image. * Access to pixel-derived image statistics for every channel in the image.
* A Promise is returned when `callback` is not provided. * A `Promise` is returned when `callback` is not provided.
* *
* - `channels`: Array of channel statistics for each channel in the image. Each channel statistic contains * - `channels`: Array of channel statistics for each channel in the image. Each channel statistic contains
* - `min` (minimum value in the channel) * - `min` (minimum value in the channel)
@ -323,9 +323,9 @@ function stats (callback) {
} }
/** /**
* Do not process input images where the number of pixels (width * height) exceeds this limit. * Do not process input images where the number of pixels (width x height) exceeds this limit.
* Assumes image dimensions contained in the input metadata can be trusted. * Assumes image dimensions contained in the input metadata can be trusted.
* The default limit is 268402689 (0x3FFF * 0x3FFF) pixels. * The default limit is 268402689 (0x3FFF x 0x3FFF) pixels.
* @param {(Number|Boolean)} limit - an integral Number of pixels, zero or false to remove limit, true to use default limit. * @param {(Number|Boolean)} limit - an integral Number of pixels, zero or false to remove limit, true to use default limit.
* @returns {Sharp} * @returns {Sharp}
* @throws {Error} Invalid limit * @throws {Error} Invalid limit

View File

@ -97,9 +97,9 @@
"color": "^3.1.0", "color": "^3.1.0",
"detect-libc": "^1.0.3", "detect-libc": "^1.0.3",
"fs-copy-file-sync": "^1.1.1", "fs-copy-file-sync": "^1.1.1",
"nan": "^2.12.1", "nan": "^2.13.1",
"npmlog": "^4.1.2", "npmlog": "^4.1.2",
"prebuild-install": "^5.2.4", "prebuild-install": "^5.2.5",
"semver": "^5.6.0", "semver": "^5.6.0",
"simple-get": "^3.0.3", "simple-get": "^3.0.3",
"tar": "^4.4.8", "tar": "^4.4.8",
@ -109,7 +109,7 @@
"async": "^2.6.2", "async": "^2.6.2",
"cc": "^1.0.2", "cc": "^1.0.2",
"decompress-zip": "^0.3.2", "decompress-zip": "^0.3.2",
"documentation": "^9.3.0", "documentation": "^9.3.1",
"exif-reader": "^1.0.2", "exif-reader": "^1.0.2",
"icc": "^1.0.0", "icc": "^1.0.0",
"license-checker": "^25.0.1", "license-checker": "^25.0.1",