इमेज का साइज़ कम करना

Image को कम करने के लिए, image.reduce() का इस्तेमाल करें. किसी इमेज को छोटा करने वाला फ़ंक्शन, imageCollection.reduce() की तरह ही काम करता है. हालांकि, इसमें कलेक्शन में मौजूद इमेज के बजाय, इमेज के बैंड को REDUCER फ़ंक्शन में इनपुट के तौर पर इस्तेमाल किया जाता है. आउटपुट भी एक इमेज होती है, जिसमें बैंड की संख्या, रिड्यूसर आउटपुट की संख्या के बराबर होती है. उदाहरण के लिए:

कोड एडिटर (JavaScript)

// Load an image and select some bands of interest.
var image = ee.Image('LANDSAT/LC08/C02/T1/LC08_044034_20140318')
    .select(['B4', 'B3', 'B2']);

// Reduce the image to get a one-band maximum value image.
var maxValue = image.reduce(ee.Reducer.max());

// Display the result.
Map.centerObject(image, 10);
Map.addLayer(maxValue, {max: 13000}, 'Maximum value image');

Python सेटअप

Python API के बारे में जानकारी पाने और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

# Load an image and select some bands of interest.
image = ee.Image('LANDSAT/LC08/C02/T1/LC08_044034_20140318').select(
    ['B4', 'B3', 'B2']
)

# Reduce the image to get a one-band maximum value image.
max_value = image.reduce(ee.Reducer.max())

# Display the result.
m = geemap.Map()
m.center_object(image, 10)
m.add_layer(max_value, {'max': 13000}, 'Maximum value image')
m