Docs: correct flatten example to use object instead of string (#2654)

This commit is contained in:
Timo Hausmann 2021-04-06 18:21:14 +02:00 committed by GitHub
parent 16cf9f0ef2
commit d1ca756bd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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();
``` ```

View File

@ -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]