Skip to content

Commit 81e388a

Browse files
committed
Docs: composite supports failOnError and limitInputPixels
1 parent 5bd5e50 commit 81e388a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/api-composite.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ and [https://www.cairographics.org/operators/][2]
4141
* `images[].raw.width` **[Number][7]?**
4242
* `images[].raw.height` **[Number][7]?**
4343
* `images[].raw.channels` **[Number][7]?**
44+
* `images[].failOnError` **[boolean][9]** @see [constructor parameters][10] (optional, default `true`)
45+
* `images[].limitInputPixels` **([number][7] | [boolean][9])** @see [constructor parameters][10] (optional, default `268402689`)
4446

4547
### Examples
4648

@@ -61,7 +63,7 @@ sharp('input.png')
6163
});
6264
```
6365

64-
* Throws **[Error][10]** Invalid parameters
66+
* Throws **[Error][11]** Invalid parameters
6567

6668
Returns **Sharp**
6769

@@ -87,4 +89,6 @@ Returns **Sharp**
8789

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

90-
[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error
92+
[10]: /api-constructor#parameters
93+
94+
[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error

lib/composite.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ const blend = {
8989
* @param {Number} [images[].raw.width]
9090
* @param {Number} [images[].raw.height]
9191
* @param {Number} [images[].raw.channels]
92+
* @param {boolean} [images[].failOnError=true] - @see {@link /api-constructor#parameters|constructor parameters}
93+
* @param {number|boolean} [images[].limitInputPixels=268402689] - @see {@link /api-constructor#parameters|constructor parameters}
9294
* @returns {Sharp}
9395
* @throws {Error} Invalid parameters
9496
*/

0 commit comments

Comments
 (0)