AI-generated Key Takeaways
-
The function visualizes an image as RGB or grayscale, with optional arguments for adjusting gain, bias, min, max, and gamma for all bands or individually.
-
The usage requires an Image object and accepts parameters like
bands,gain,bias,min,max,gamma,opacity,palette, andforceRgbOutputto control the visualization. -
The arguments
gain,bias,min,max, andgammacan accept a single value or a list of values corresponding to the number of bands being visualized.
| Usage | Returns |
|---|---|
Image.
visualize
( bands
, gain
, bias
, min
, max
, gamma
, opacity
, palette
, forceRgbOutput
)
|
Image |
| Argument | Type | Details |
|---|---|---|
|
this:
image
|
Image | The image to visualize. |
bands
|
Object, default: null | A list of the bands to visualize. If empty, the first 3 are used. |
gain
|
Object, default: null | The visualization gain(s) to use. |
bias
|
Object, default: null | The visualization bias(es) to use. |
min
|
Object, default: null | The value(s) to map to RGB8 value 0. |
max
|
Object, default: null | The value(s) to map to RGB8 value 255. |
gamma
|
Object, default: null | The gamma correction factor(s) to use. |
opacity
|
Number, default: null | The opacity scaling factor to use. |
palette
|
Object, default: null | The color palette to use. List of CSS color identifiers or hexadecimal color strings (e.g., ['red', '00FF00', 'blueviolet']). |
forceRgbOutput
|
Boolean, default: false | Whether to produce RGB output even for single-band inputs. |

