({{, (RefLink[ImageChannels, paclet:ref/ImageChannels])[image] 
gives the number of channels present in the data for the (RefLink[Image, paclet:ref/Image]) or (RefLink[Image3D, paclet:ref/Image3D]) object image.}})

OpenersNotesSection(Spacer1)Details

For a standard RGB image, (RefLink[ImageChannels, paclet:ref/ImageChannels])[image] gives 3.

For a grayscale image, (RefLink[ImageChannels, paclet:ref/ImageChannels])[image] gives 1.

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

This gives the number of channels present in an RGB image:

ImageChannels[]

Channels in an RGBA image:

ImageChannels[]

A 9-channel random image:

Image[RandomReal[1, {20,20,9}]]

ImageChannels[%]

Channels in a 3D RGB image:

ImageChannels[]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[BinaryImageQ, paclet:ref/BinaryImageQ])  ▪  (RefLink[ImageDimensions, paclet:ref/ImageDimensions])  ▪  (RefLink[ImageData, paclet:ref/ImageData])  ▪  (RefLink[ImageType, paclet:ref/ImageType])  ▪  (RefLink[Image, paclet:ref/Image])  ▪  (RefLink[ColorSeparate, paclet:ref/ColorSeparate])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Image Processing, paclet:tutorial/ImageProcessing])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Color Processing, paclet:guide/ColorProcessing])}, {▪(RefLinkPlain[3D Images, paclet:guide/3DImages])}, {▪(RefLinkPlain[Image Representation, paclet:guide/ImageRepresentation])}})}})