Docs: extractChannel output colourspace is b-w or grey16

This commit is contained in:
Lovell Fuller 2025-08-18 10:24:38 +01:00
parent 51d1a49abc
commit cd337e4de3
2 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,8 @@ const rgba = await sharp(rgb)
Extract a single channel from a multi-channel image. Extract a single channel from a multi-channel image.
The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
**Throws**: **Throws**:

View File

@ -74,6 +74,8 @@ function ensureAlpha (alpha) {
/** /**
* Extract a single channel from a multi-channel image. * Extract a single channel from a multi-channel image.
* *
* The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
*
* @example * @example
* // green.jpg is a greyscale image containing the green channel of the input * // green.jpg is a greyscale image containing the green channel of the input
* await sharp(input) * await sharp(input)