Skip to content

Commit

Permalink
Docs: ensure alpha attribute is used for transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Jan 13, 2017
1 parent c6a28db commit 4730554
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/api-operation.md
Expand Up @@ -169,7 +169,7 @@ This operation will always occur after resizing and extraction, if any.
// to the top, left and right edges and 20 to the bottom edge
sharp(input)
.resize(140)
.background({r: 0, g: 0, b: 0, a: 0})
.background({r: 0, g: 0, b: 0, alpha: 0})
.extend({top: 10, bottom: 20, left: 10, right: 10})
...
```
Expand Down
2 changes: 1 addition & 1 deletion docs/api-resize.md
Expand Up @@ -110,7 +110,7 @@ contain an alpha channel, even when the input image does not.
```javascript
sharp('input.gif')
.resize(200, 300)
.background({r: 0, g: 0, b: 0, a: 0})
.background({r: 0, g: 0, b: 0, alpha: 0})
.embed()
.toFormat(sharp.format.webp)
.toBuffer(function(err, outputBuffer) {
Expand Down
2 changes: 1 addition & 1 deletion lib/resize.js
Expand Up @@ -200,7 +200,7 @@ const crop = function crop (crop) {
* @example
* sharp('input.gif')
* .resize(200, 300)
* .background({r: 0, g: 0, b: 0, a: 0})
* .background({r: 0, g: 0, b: 0, alpha: 0})
* .embed()
* .toFormat(sharp.format.webp)
* .toBuffer(function(err, outputBuffer) {
Expand Down

0 comments on commit 4730554

Please sign in to comment.