API (v2.0.0) - Giro3D
    Preparing search index...

    Type Alias ChannelMapping

    ChannelMapping:
        | [number]
        | [number, number, number]
        | [number, number, number, number]

    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.

    • I have a color image, but I only want to see the blue channel (sample = 1): [1]
    • I have a grayscale image, with only 1 sample: [0]
    • I have a grayscale image with a transparency channel at index 1: [0, 0, 0, 1]
    • I have a color image without a transparency channel: [0, 1, 2]
    • I have a color image with a transparency channel at index 3: [0, 1, 2, 3]
    • I have a color image with transparency at index 3, but I only want to see the blue channel: [1, 1, 1, 3]
    • I have a color image but in the B, G, R order: [2, 1, 0]