WLJS LogoWLJS Notebook

ImageChannels

ImageChannels[image] gives the number of channels present in the data for the Image object.

Examples

RGB image channels:

img = ExampleData[{"TestImage", "Lena"}];
ImageChannels[img]
(* 3 *)

Grayscale image:

ImageChannels[ColorConvert[img, "Grayscale"]]
(* 1 *)

Please visit the official Wolfram Language Reference for more details.

On this page