ee.Image.visualize

  • Visualizes an image in RGB or grayscale by adjusting gain, bias, min/max values, and gamma correction for specified or default bands.

  • Accepts single values or lists for gain, bias, min, max, and gamma to apply to all or individual bands, respectively.

  • Offers customization options including opacity, a color palette for multi-band visualization, and forced RGB output.

  • Uses a list of CSS color identifiers or hexadecimal color strings for the palette parameter when visualizing multi-band images.

  • Operates on an input image and returns a modified image with the specified visualization parameters applied.

Produces an RGB or grayscale visualization of an image. Each of the gain, bias, min, max and gamma arguments can take either a single value, which will be applied to all bands, or a list of values the same length as bands.

UsageReturns
Image.visualize(bands, gain, bias, min, max, gamma, opacity, palette, forceRgbOutput)Image
ArgumentTypeDetails
this: imageImageThe image to visualize.
bandsObject, default: nullA list of the bands to visualize. If empty, the first 3 are used.
gainObject, default: nullThe visualization gain(s) to use.
biasObject, default: nullThe visualization bias(es) to use.
minObject, default: nullThe value(s) to map to RGB8 value 0.
maxObject, default: nullThe value(s) to map to RGB8 value 255.
gammaObject, default: nullThe gamma correction factor(s) to use.
opacityNumber, default: nullThe opacity scaling factor to use.
paletteObject, default: nullThe color palette to use. List of CSS color identifiers or hexadecimal color strings (e.g., ['red', '00FF00', 'blueviolet']).
forceRgbOutputBoolean, default: falseWhether to produce RGB output even for single-band inputs.