mirror of
https://github.com/lovell/sharp.git
synced 2025-07-10 19:10:14 +02:00
Docs: correct flatten example to use object instead of string (#2654)
This commit is contained in:
parent
16cf9f0ef2
commit
d1ca756bd8
@ -180,7 +180,7 @@ Merge alpha transparency channel, if any, with a background, then remove the alp
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
await sharp(rgbaInput)
|
await sharp(rgbaInput)
|
||||||
.flatten('#F0A703')
|
.flatten({background: '#F0A703' })
|
||||||
.toBuffer();
|
.toBuffer();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ function blur (sigma) {
|
|||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* await sharp(rgbaInput)
|
* await sharp(rgbaInput)
|
||||||
* .flatten('#F0A703')
|
* .flatten({background: '#F0A703' })
|
||||||
* .toBuffer();
|
* .toBuffer();
|
||||||
*
|
*
|
||||||
* @param {Object} [options]
|
* @param {Object} [options]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user