|AWARE [SYSTEMS]||Imaging expertise for the Delphi developer|
|TIFF and LibTiff Mailing List Archive|
LibTiff Mailing List
2002.01.21 15:53 "Re: How to interpret 16-bit GrayScale image?", by Marti Maria
Hi, > I had constructed a windows bitmap using HBITMAPINFOHEADER and had hoped to > get an unsigned 16-bit grayscale image. But unfortunately, like what Marti > Maria and Peter had said, I got a colored image instead. I realized that > once the bitCount is more than 8 bits, the image is taken as RGB image with > no color table. > > Thanks Marti for your help on converting the 16-bit grayscale image to 8 > bit, but as I can't afford to lose the information, i might need to spend > more effort and convert the 16-bit to 24-bit instead. Welcome, but I'm afraid you will not advance further, since even in 24-bit mode you still get only 256 grays. From device point of view, you get gray by setting R=G=B, so there are only 256 possible values. Gamma then does collapse several of these values, so you could end in 200 or less effective shades of gray. There are techniques to get more grays by specifying colors not totally gray, i.e. (230, 231, 229). But the value of these depends heavely of the monitor colorimetry, and most times this does give more headeaches that benefits. > A question, does TIFF supports both unsigned 16-bit colored and grayscale > images? Yes. TIFF can deal with almost anything. But note that TIFF is only a storage scheme, not tied with the display adapter, that usually can manage only 8 bps. There are some medical instruments rendering 11 bps, and some printers can even give more, but these are really expensive. TIFF in the other hand, can store images that no device can render (LogLuv ones, for example) Regards, Marti.