Announcement: On November 13, 2024, all users will need to use a Cloud project in order to access Earth Engine. After this date, continued individual access without a Cloud project will require an exception.
Stay organized with collections
Save and categorize content based on your preferences.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-13 UTC."],[[["Visualizes an image in RGB or grayscale by adjusting gain, bias, min/max values, and gamma correction, which can be applied to all or individual bands."],["The visualization can be customized using a color palette, opacity, and forced RGB output for single-band images."],["Input parameters such as bands, gain, bias, min, max, and gamma can be provided as a single value or a list of values corresponding to each band."],["The function takes an image as input and returns a modified image with the specified visualization parameters applied."]]],[]]