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
await sharp(rgbaInput)
.flatten('#F0A703')
.flatten({background: '#F0A703' })
.toBuffer();
```

View File

@ -272,7 +272,7 @@ function blur (sigma) {
*
* @example
* await sharp(rgbaInput)
* .flatten('#F0A703')
* .flatten({background: '#F0A703' })
* .toBuffer();
*
* @param {Object} [options]