2002.01.16 11:07 "How to interpret 16-bit GrayScale image?", by Bad Badtz

2002.01.23 04:18 "Re: How to interpret 16-bit GrayScale image?", by Kevin D. Quitt

      a8_by257 = (unsigned char) (double) (i / 257. + .5);

You can save yourself a whole lot of time by doing:

a8_by257 = (unsigned char)((i + 128) / 257);