ImageFile.Stoner__Image__imagefuncs__quantize

ImageFile.Stoner__Image__imagefuncs__quantize(output, levels=None)

Quantise the image data into fixed levels given by a mapping.

Parameters

output (list,array,tuple) – Output levels to return.

Keyword Arguments

levels (list, array or None) – The input band markers. If None is constructed from the data.

The number of levels should be one less than the number of output levels given.

Notes

The routine will ignore all masked pixels and will preserve the mask.