Raster having
UNSIGNED_8BITS pixel data type will have range of 0 - 255, whereas rasters having UNSIGNED_16BITS pixel data type will have range of 0 - 65535. If provided pixel value is greater than either 255 for UNSIGNED_8BITS or 65535 for UNSIGNED_16BITS, then the extra bit will be truncated.Raster that have float or double values will result in an empty byte array. PNG only accepts Integer values, if you want to write your raster to an image file, please refer to RS_AsGeoTiff.
Signatures
Parameters
The input raster.
The maximum width of the output PNG.
Return type
The raster as a PNG byte array.

