How the samples in the GeoTIFF files (also
known as bands), are mapped to the color channels of an RGB(A) image.
Must be an array of either 1, 3 or 4 elements. Each element is the index of a sample in the
source file. For example, to map the samples 0, 3, and 2 to the R, G, B colors, you can use
[0, 3, 2].
1 element means the resulting image will be a grayscale image
3 elements means the resulting image will be a RGB image
4 elements means the resulting image will be a RGB image with an alpha channel.
Note: if the channels is undefined, then they will be selected automatically with the
following rules: if the image has 3 or more samples, the first 3 samples will be used,
(i.e [0, 1, 2]). Otherwise, only the first sample will be used (i.e [0]). In any case,
no transparency channel will be selected automatically, as there is no way to determine
if a specific sample represents transparency.
How the samples in the GeoTIFF files (also known as bands), are mapped to the color channels of an RGB(A) image.
Must be an array of either 1, 3 or 4 elements. Each element is the index of a sample in the source file. For example, to map the samples 0, 3, and 2 to the R, G, B colors, you can use
[0, 3, 2]
.Note: if the channels is
undefined
, then they will be selected automatically with the following rules: if the image has 3 or more samples, the first 3 samples will be used, (i.e[0, 1, 2]
). Otherwise, only the first sample will be used (i.e[0]
). In any case, no transparency channel will be selected automatically, as there is no way to determine if a specific sample represents transparency.Examples
[1]
[0]
[0, 0, 0, 1]
[0, 1, 2]
[0, 1, 2, 3]
[1, 1, 1, 3]
[2, 1, 0]