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
|
## 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
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ Building from source requires:
|
|||||||
[](https://travis-ci.org/lovell/sharp)
|
[](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.
|
|||||||
[](https://travis-ci.org/lovell/sharp)
|
[](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`.
|
|||||||
[](https://ci.appveyor.com/project/lovell/sharp)
|
[](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.
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user