nw_float_to_byte

pydl.pydlutils.rgbcolor.nw_float_to_byte(image, bits=8)[source]

Converts an array of floats in [0.0, 1.0] to bytes in [0, 255].

Parameters:
imagendarray

Image to convert.

bitsint, optional

Number of bits in final image.

Returns:
ndarray

Converted image.