From cd337e4de3381397b7c345b4a4edbffc69c79f8a Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 18 Aug 2025 10:24:38 +0100 Subject: [PATCH] Docs: extractChannel output colourspace is b-w or grey16 --- docs/src/content/docs/api-channel.md | 2 ++ lib/channel.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/src/content/docs/api-channel.md b/docs/src/content/docs/api-channel.md index 29808348..fb8ed333 100644 --- a/docs/src/content/docs/api-channel.md +++ b/docs/src/content/docs/api-channel.md @@ -61,6 +61,8 @@ const rgba = await sharp(rgb) Extract a single channel from a multi-channel image. +The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit). + **Throws**: diff --git a/lib/channel.js b/lib/channel.js index 46bce3d5..b6381ae9 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -74,6 +74,8 @@ function ensureAlpha (alpha) { /** * Extract a single channel from a multi-channel image. * + * The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit). + * * @example * // green.jpg is a greyscale image containing the green channel of the input * await sharp(input)