Doc refresh and changelog entry for #976

This commit is contained in:
Lovell Fuller 2017-10-08 10:02:08 +01:00
parent b4d72bd544
commit d46512af1c
4 changed files with 11 additions and 2 deletions

View File

@ -16,6 +16,9 @@
a String containing the path to an JPEG, PNG, WebP, GIF, SVG or TIFF image file.
JPEG, PNG, WebP, GIF, SVG, TIFF or raw pixel image data can be streamed into the object when not present.
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** if present, is an Object with optional attributes.
- `options.failOnError` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** by default apply a "best effort"
to decode images, even if the data is corrupt or invalid. Set this flag to true
if you'd rather halt processing and raise an error when loading invalid images. (optional, default `false`)
- `options.density` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** integral number representing the DPI for vector images. (optional, default `72`)
- `options.raw` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** describes raw pixel input image data. See `raw()` for pixel ordering.
- `options.raw.width` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?**

View File

@ -14,6 +14,10 @@ Requires libvips v8.6.0.
[#872](https://github.com/lovell/sharp/issues/872)
[@wmertens](https://github.com/wmertens)
* Add failOnError option to fail-fast on bad input image data.
[#976](https://github.com/lovell/sharp/pull/976)
[@mceachen](https://github.com/mceachen)
### v0.18 - "*ridge*"
Requires libvips v8.5.5.

View File

@ -102,6 +102,7 @@ the help and code contributions of the following people:
* [Yves Bos](https://github.com/YvesBos)
* [Nicolas Coden](https://github.com/ncoden)
* [Matt Parrish](https://github.com/pbomb)
* [Matthew McEachen](https://github.com/mceachen)
Thank you!

View File

@ -38,7 +38,8 @@
"YvesBos <yves_bos@outlook.com>",
"Guy Maliar <guy@tailorbrands.com>",
"Nicolas Coden <nicolas@ncoden.fr>",
"Matt Parrish <matt.r.parrish@gmail.com>"
"Matt Parrish <matt.r.parrish@gmail.com>",
"Matthew McEachen <matthew+github@mceachen.org>"
],
"scripts": {
"clean": "rm -rf node_modules/ build/ vendor/ coverage/ test/fixtures/output.*",
@ -81,7 +82,7 @@
"documentation": "^5.3.2",
"exif-reader": "^1.0.2",
"icc": "^1.0.0",
"mocha": "^3.5.0",
"mocha": "^4.0.1",
"nyc": "^11.1.0",
"rimraf": "^2.6.1",
"semistandard": "^11.0.0",