Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.Image
Stay organized with collections
Save and categorize content based on your preferences.
An object to represent an Earth Engine image. This constructor accepts a variety of arguments:
- A string: an EarthEngine asset id,
- A string and a number: an EarthEngine asset id and version,
- A number or ee.Array: creates a constant image,
- A list: creates an image out of each list element and combines them into a single image,
- An ee.Image: returns the argument,
- Nothing: results in an empty transparent image.
Usage | Returns | ee.Image(args) | Image |
Argument | Type | Details | args | Image|List<Object>|Number|Object|String, optional | Constructor argument. |
Examples
Code Editor (JavaScript)
var image = ee.Image('NASA/NASADEM_HGT/001');
Map.setZoom(3);
Map.addLayer(image.select('elevation'), {min: -1e3, max: 5e3}, 'Elevation');
// Image NASA/NASADEM_HGT/001 (3 bands)
// type: Image
// id: NASA/NASADEM_HGT/001
// version: 1641990521971299
// bands: List (3 elements)
// properties: Object (22 properties)
print(image);
var transparent = ee.Image();
Map.addLayer(transparent, null, 'transparent', false);
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", int ∈ [0, 0], EPSG:4326
print(transparent);
// Create a multi-band image from a list of constants.
var orange = ee.Image([0xff, 0x88, 0x00]);
Map.addLayer(orange, {min: 0, max: 0xff}, 'orange', false);
// Image (3 bands)
// type: Image
// bands: List (3 elements)
// 0: "constant", int ∈ [255, 255], EPSG:4326
// 1: "constant_1", int ∈ [136, 136], EPSG:4326
// 2: "constant_2", int ∈ [0, 0], EPSG:4326
print(orange);
// Create a one band image where each pixel is an array of three values.
var imageOfArray = ee.Image(ee.Array([0x00, 0x00, 0xff]));
Map.addLayer(imageOfArray, null, 'imageOfArray', false);
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", unsigned int8, 1 dimension, EPSG:4326
// id: constant
// crs: EPSG:4326
// crs_transform: [1,0,0,0,1,0]
// data_type: unsigned int8, 1 dimension
// type: PixelType
// dimensions: 1
// max: 255
// min: 0
// precision: int
print(imageOfArray);
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
Colab (Python)
image = ee.Image('NASA/NASADEM_HGT/001')
m = geemap.Map()
m.zoom = 3
display(m)
m.add_layer(image.select('elevation'), {'min': -1e3, 'max': 5e3}, 'Elevation')
# Image NASA/NASADEM_HGT/001 (3 bands)
# type: Image
# id: NASA/NASADEM_HGT/001
# version: 1641990521971299
# 'bands': List (3 elements)
# properties: Object (22 properties)
display(image)
transparent = ee.Image()
m.add_layer(transparent, None, 'transparent', False)
# Image (1 band)
# type: Image
# 'bands': List (1 element)
# 0: "constant", int ∈ [0, 0], EPSG:4326
display(transparent)
# Create a multi-band image from a list of constants.
orange = ee.Image([0xFF, 0x88, 0x00])
m.add_layer(orange, {'min': 0, 'max': 0xFF}, 'orange', False)
# Image (3 bands)
# type: Image
# 'bands': List (3 elements)
# 0: "constant", int ∈ [255, 255], EPSG:4326
# 1: "constant_1", int ∈ [136, 136], EPSG:4326
# 2: "constant_2", int ∈ [0, 0], EPSG:4326
display(orange)
# Create a one band image where each pixel is an array of three values.
image_of_array = ee.Image(ee.Array([0x00, 0x00, 0xFF]))
m.add_layer(image_of_array, None, 'image_of_array', False)
# Image (1 band)
# type: Image
# 'bands': List (1 element)
# 0: "constant", unsigned int8, 1 dimension, EPSG:4326
# id: constant
# crs: EPSG:4326
# crs_transform: [1,0,0,0,1,0]
# data_type: unsigned int8, 1 dimension
# type: PixelType
# dimensions: 1
# 'max': 255
# 'min': 0
# precision: int
display(image_of_array)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-08 UTC.
[null,null,["Last updated 2025-07-08 UTC."],[[["\u003cp\u003e\u003ccode\u003eee.Image()\u003c/code\u003e is a constructor used to create or represent Earth Engine images.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts arguments such as asset IDs, constants, lists, and other images to construct an image object.\u003c/p\u003e\n"],["\u003cp\u003eWhen called with no arguments, it generates an empty, transparent image.\u003c/p\u003e\n"],["\u003cp\u003eIt enables users to create images from a variety of sources, including asset IDs, constants, lists and more, making them ready for analysis and visualization.\u003c/p\u003e\n"]]],["The core content details creating Earth Engine images using `ee.Image()`. Images can be constructed from an asset ID string, an ID and version number, a number/`ee.Array` for constant images, or a list that becomes a multi-band image. An existing `ee.Image` will return the argument, and calling with nothing results in a transparent image. Examples demonstrate loading asset images, generating constant or multi-band images, and displaying these results using code examples in Javascript and Python.\n"],null,["# ee.Image\n\n\u003cbr /\u003e\n\nAn object to represent an Earth Engine image. This constructor accepts a variety of arguments:\n\n\u003cbr /\u003e\n\n- A string: an EarthEngine asset id,\n\n- A string and a number: an EarthEngine asset id and version,\n\n- A number or ee.Array: creates a constant image,\n\n- A list: creates an image out of each list element and combines them into a single image,\n\n- An ee.Image: returns the argument,\n\n- Nothing: results in an empty transparent image.\n\n| Usage | Returns |\n|----------------------|---------|\n| `ee.Image(`*args*`)` | Image |\n\n| Argument | Type | Details |\n|----------|---------------------------------------------------------|-----------------------|\n| `args` | Image\\|List\\\u003cObject\\\u003e\\|Number\\|Object\\|String, optional | Constructor argument. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nvar image = ee.Image('NASA/NASADEM_HGT/001');\n\nMap.setZoom(3);\nMap.addLayer(image.select('elevation'), {min: -1e3, max: 5e3}, 'Elevation');\n// Image NASA/NASADEM_HGT/001 (3 bands)\n// type: Image\n// id: NASA/NASADEM_HGT/001\n// version: 1641990521971299\n// bands: List (3 elements)\n// properties: Object (22 properties)\nprint(image);\n\nvar transparent = ee.Image();\nMap.addLayer(transparent, null, 'transparent', false);\n// Image (1 band)\n// type: Image\n// bands: List (1 element)\n// 0: \"constant\", int ∈ [0, 0], EPSG:4326\nprint(transparent);\n\n// Create a multi-band image from a list of constants.\nvar orange = ee.Image([0xff, 0x88, 0x00]);\nMap.addLayer(orange, {min: 0, max: 0xff}, 'orange', false);\n// Image (3 bands)\n// type: Image\n// bands: List (3 elements)\n// 0: \"constant\", int ∈ [255, 255], EPSG:4326\n// 1: \"constant_1\", int ∈ [136, 136], EPSG:4326\n// 2: \"constant_2\", int ∈ [0, 0], EPSG:4326\nprint(orange);\n\n// Create a one band image where each pixel is an array of three values.\nvar imageOfArray = ee.Image(ee.Array([0x00, 0x00, 0xff]));\nMap.addLayer(imageOfArray, null, 'imageOfArray', false);\n// Image (1 band)\n// type: Image\n// bands: List (1 element)\n// 0: \"constant\", unsigned int8, 1 dimension, EPSG:4326\n// id: constant\n// crs: EPSG:4326\n// crs_transform: [1,0,0,0,1,0]\n// data_type: unsigned int8, 1 dimension\n// type: PixelType\n// dimensions: 1\n// max: 255\n// min: 0\n// precision: int\nprint(imageOfArray);\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nimage = ee.Image('NASA/NASADEM_HGT/001')\n\nm = geemap.Map()\nm.zoom = 3\ndisplay(m)\nm.add_layer(image.select('elevation'), {'min': -1e3, 'max': 5e3}, 'Elevation')\n# Image NASA/NASADEM_HGT/001 (3 bands)\n# type: Image\n# id: NASA/NASADEM_HGT/001\n# version: 1641990521971299\n# 'bands': List (3 elements)\n# properties: Object (22 properties)\ndisplay(image)\n\ntransparent = ee.Image()\nm.add_layer(transparent, None, 'transparent', False)\n# Image (1 band)\n# type: Image\n# 'bands': List (1 element)\n# 0: \"constant\", int ∈ [0, 0], EPSG:4326\ndisplay(transparent)\n\n# Create a multi-band image from a list of constants.\norange = ee.Image([0xFF, 0x88, 0x00])\nm.add_layer(orange, {'min': 0, 'max': 0xFF}, 'orange', False)\n# Image (3 bands)\n# type: Image\n# 'bands': List (3 elements)\n# 0: \"constant\", int ∈ [255, 255], EPSG:4326\n# 1: \"constant_1\", int ∈ [136, 136], EPSG:4326\n# 2: \"constant_2\", int ∈ [0, 0], EPSG:4326\ndisplay(orange)\n\n# Create a one band image where each pixel is an array of three values.\nimage_of_array = ee.Image(ee.Array([0x00, 0x00, 0xFF]))\nm.add_layer(image_of_array, None, 'image_of_array', False)\n# Image (1 band)\n# type: Image\n# 'bands': List (1 element)\n# 0: \"constant\", unsigned int8, 1 dimension, EPSG:4326\n# id: constant\n# crs: EPSG:4326\n# crs_transform: [1,0,0,0,1,0]\n# data_type: unsigned int8, 1 dimension\n# type: PixelType\n# dimensions: 1\n# 'max': 255\n# 'min': 0\n# precision: int\ndisplay(image_of_array)\n```"]]