I am computing the NDWI of an area , and I used the code below to generate a result of pixel value 1 and 0 only. Pixel value 1 will be displayed in blue means the pixel's NDWI value once had exceeded 0.3 and pixel value 0 will be displayed in white meaning the pixel's NDWI value has never reach 0.3 or more
var gte3 = ndwi.map(function(image){
return image.gte(0.3);
});
var ndwigt3 = gte3.max();
var ndwigte3Viz = {min: 0, max: 1, palette: ['white', 'blue']};
Map.addLayer(ndwiget3, ndwigte3Viz , 'ndwigte3', false);
I could see the white and blue pixels when i open the layer in code editor, but once i output it with the following code, it turns out to be a total black image
Export.image.toDrive({
image: ndwigte3,
description: 'ndwigte3',
region: Border,
scale: 30,
maxPixels:1e13,
skipEmptyTiles: false
});