mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Improve docs relating to single-channel raw pixel output
This commit is contained in:
@@ -54,9 +54,10 @@ function ensureAlpha () {
|
||||
* @example
|
||||
* sharp(input)
|
||||
* .extractChannel('green')
|
||||
* .toFile('input_green.jpg', function(err, info) {
|
||||
* .toColourspace('b-w')
|
||||
* .toFile('green.jpg', function(err, info) {
|
||||
* // info.channels === 1
|
||||
* // input_green.jpg contains the green channel of the input image
|
||||
* // green.jpg is a greyscale image containing the green channel of the input
|
||||
* });
|
||||
*
|
||||
* @param {Number|String} channel - zero-indexed band number to extract, or `red`, `green` or `blue` as alternative to `0`, `1` or `2` respectively.
|
||||
|
||||
Reference in New Issue
Block a user