I have a buffer with many positive 16bit values (which are stored as doubl开发者_Go百科es) that I would like to quantize to 8bit (0-255 values).