Skip to content

Commit

Permalink
Docs: composite supports failOnError and limitInputPixels
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed May 15, 2021
1 parent 5bd5e50 commit 81e388a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/api-composite.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ and [https://www.cairographics.org/operators/][2]
* `images[].raw.width` **[Number][7]?**
* `images[].raw.height` **[Number][7]?**
* `images[].raw.channels` **[Number][7]?**
* `images[].failOnError` **[boolean][9]** @see [constructor parameters][10] (optional, default `true`)
* `images[].limitInputPixels` **([number][7] | [boolean][9])** @see [constructor parameters][10] (optional, default `268402689`)

### Examples

Expand All @@ -61,7 +63,7 @@ sharp('input.png')
});
```

* Throws **[Error][10]** Invalid parameters
* Throws **[Error][11]** Invalid parameters

Returns **Sharp**

Expand All @@ -87,4 +89,6 @@ Returns **Sharp**

[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error
[10]: /api-constructor#parameters

[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error
2 changes: 2 additions & 0 deletions lib/composite.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ const blend = {
* @param {Number} [images[].raw.width]
* @param {Number} [images[].raw.height]
* @param {Number} [images[].raw.channels]
* @param {boolean} [images[].failOnError=true] - @see {@link /api-constructor#parameters|constructor parameters}
* @param {number|boolean} [images[].limitInputPixels=268402689] - @see {@link /api-constructor#parameters|constructor parameters}
* @returns {Sharp}
* @throws {Error} Invalid parameters
*/
Expand Down

0 comments on commit 81e388a

Please sign in to comment.