From d1ca756bd86c0a2a6eaa9e03ab8188d21f088bf5 Mon Sep 17 00:00:00 2001 From: Timo Hausmann Date: Tue, 6 Apr 2021 18:21:14 +0200 Subject: [PATCH] Docs: correct flatten example to use object instead of string (#2654) --- docs/api-operation.md | 2 +- lib/operation.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-operation.md b/docs/api-operation.md index cfcea48e..6b739ff9 100644 --- a/docs/api-operation.md +++ b/docs/api-operation.md @@ -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(); ``` diff --git a/lib/operation.js b/lib/operation.js index 2a3b52d3..7ab11473 100644 --- a/lib/operation.js +++ b/lib/operation.js @@ -272,7 +272,7 @@ function blur (sigma) { * * @example * await sharp(rgbaInput) - * .flatten('#F0A703') + * .flatten({background: '#F0A703' }) * .toBuffer(); * * @param {Object} [options]