ee.Image.cast

Casts some or all bands of an image to the specified types.

UsageReturns
Image.cast(bandTypes, bandOrder)Image
ArgumentTypeDetails
this: imageImageThe image to cast.
bandTypesDictionaryA dictionary from band name to band types. Types can be PixelTypes or strings. The valid strings are: 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'byte', 'short', 'int', 'long', 'float', and 'double'. If bandTypes includes bands that are not already in the input image, they will be added to the image as transparent bands. If bandOrder isn't also specified, new bands will be appended in alphabetical order.
bandOrderList, default: nullA list specifying the order of the bands in the result. If specified, must match the full list of bands in the result.