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.21 17:23 "Re: How to interpret 16-bit GrayScale image?", by Daniel McCoy
2002.01.21 23:26 "Re: How to interpret 16-bit GrayScale image?", by Martí_Maria
2002.01.25 14:27 "Re: How to interpret 16-bit GrayScale image?", by Thomas Kumlehn
[...]

2002.01.25 14:27 "Re: How to interpret 16-bit GrayScale image?", by Thomas Kumlehn

 --- Daniel McCoy <mccoy@pixar.com> schrieb: >
<marti@littlecms.com> wrote:

When converting the OTHER way, from 8 bits UP to 16 bits, of course, you want to MULTIPLY by 257 and not 256 so that you fill in the low bits. That way FF becomes FFFF instead of FF00. Clearly better. No question.

I found a much faster way:
Just copy the high byte down to the low byte
00 -> 00 00
01 -> 01 01
...
FE -> FE FE
FF -> FF FF

This way, the value range is evenly filled and it's much faster with bit ops (shift/or).

But most often need colour corr. and the like and use LUTs anyway.

=====
kind regards,

Thomas Kumlehn
PIXEL PARTNER (R)
mobile +44 7960 384334

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Ihre E-Mail noch individueller? - http://domains.yahoo.de