AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

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
2002.01.24 01:47 "Re: How to interpret 16-bit GrayScale image?", by Bad Badtz
[...]

2002.01.24 01:47 "Re: How to interpret 16-bit GrayScale image?", by Bad Badtz

Hi,

Would like to thank all of you for your advice and suggestions!

regards,
Nicole

>From: "Kevin D. Quitt" <Kevin@Quitt.net>
>To: <tiff@olympiakos.com>

>Subject: Re: How to interpret 16-bit GrayScale image? >Date: Tue, 22 Jan 2002 20:18:49 -0800

On Mon, 21 Jan 2002 20:06:05 -0320, you wrote:

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);

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com