ImageTools
Layers
return the layer information of an image
Calling Sequence
Parameters
Description
Examples
Layers(img, info)
img
-
Image; input image
info
(optional) type of information to return
The Layers command returns the number of layers of an image. A grayscale image has one layer. A color image has three layers. A color image with alpha channel has four layers.
The img parameter is the image.
Information
The optional info parameter specifies the information to return. Its default value is size. The following operations are supported:
lower: lower layer index
upper: upper layer index
range: layer index range
size: number of layers
with⁡ImageTools:
img≔Create⁡100,200,channels=3:
Layers⁡img
3
map2⁡Layers,img,size,lower,upper,range
3,1,3,1..3
img≔Create⁡100,200:
1
See Also
ImageTools[CombineLayers]
ImageTools[GetLayer]
ImageTools[Height]
ImageTools[SetLayer]
ImageTools[Width]
Download Help Document