diff --git a/docs/api-composite.md b/docs/api-composite.md index 03c65485..121d98de 100644 --- a/docs/api-composite.md +++ b/docs/api-composite.md @@ -35,8 +35,7 @@ If the overlay image contains an alpha channel then composition with premultipli sharp('input.png') .rotate(180) .resize(300) - .flatten() - .background('#ff6600') + .flatten( { background: '#ff6600' } ) .overlayWith('overlay.png', { gravity: sharp.gravity.southeast } ) .sharpen() .withMetadata() diff --git a/lib/composite.js b/lib/composite.js index 82e0e78d..11114673 100644 --- a/lib/composite.js +++ b/lib/composite.js @@ -14,8 +14,7 @@ const is = require('./is'); * sharp('input.png') * .rotate(180) * .resize(300) - * .flatten() - * .background('#ff6600') + * .flatten( { background: '#ff6600' } ) * .overlayWith('overlay.png', { gravity: sharp.gravity.southeast } ) * .sharpen() * .withMetadata()