mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Small improvements to input and install docs, bump deps
This commit is contained in:
parent
54e5514b9a
commit
6387fb79b1
@ -22,7 +22,7 @@ Returns **Sharp**
|
||||
## metadata
|
||||
|
||||
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`
|
||||
- `size`: Total size of image in bytes, for Stream and Buffer input only
|
||||
@ -70,7 +70,7 @@ Returns **([Promise][5]<[Object][6]> | Sharp)**
|
||||
## stats
|
||||
|
||||
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
|
||||
- `min` (minimum value in the channel)
|
||||
@ -105,9 +105,9 @@ Returns **[Promise][5]<[Object][6]>**
|
||||
|
||||
## 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.
|
||||
The default limit is 268402689 (0x3FFF _ 0x3FFF) pixels.
|
||||
The default limit is 268402689 (0x3FFF x 0x3FFF) pixels.
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -36,7 +36,7 @@ Building from source requires:
|
||||
[](https://travis-ci.org/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 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.:
|
||||
|
||||
@ -86,7 +86,7 @@ via `sharp.cache(false)` to avoid a stack overflow.
|
||||
[](https://travis-ci.org/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 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
|
||||
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`.
|
||||
[](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 13MB. If you are having issues during
|
||||
installation consider removing the directory ```C:\Users\[user]\AppData\Roaming\npm-cache\_libvips```.
|
||||
This involves an automated HTTPS download of approximately 14MB.
|
||||
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.
|
||||
|
||||
|
@ -174,7 +174,7 @@ function clone () {
|
||||
|
||||
/**
|
||||
* 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`
|
||||
* - `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.
|
||||
* 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
|
||||
* - `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.
|
||||
* 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.
|
||||
* @returns {Sharp}
|
||||
* @throws {Error} Invalid limit
|
||||
|
@ -97,9 +97,9 @@
|
||||
"color": "^3.1.0",
|
||||
"detect-libc": "^1.0.3",
|
||||
"fs-copy-file-sync": "^1.1.1",
|
||||
"nan": "^2.12.1",
|
||||
"nan": "^2.13.1",
|
||||
"npmlog": "^4.1.2",
|
||||
"prebuild-install": "^5.2.4",
|
||||
"prebuild-install": "^5.2.5",
|
||||
"semver": "^5.6.0",
|
||||
"simple-get": "^3.0.3",
|
||||
"tar": "^4.4.8",
|
||||
@ -109,7 +109,7 @@
|
||||
"async": "^2.6.2",
|
||||
"cc": "^1.0.2",
|
||||
"decompress-zip": "^0.3.2",
|
||||
"documentation": "^9.3.0",
|
||||
"documentation": "^9.3.1",
|
||||
"exif-reader": "^1.0.2",
|
||||
"icc": "^1.0.0",
|
||||
"license-checker": "^25.0.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user