POV-Ray : Newsgroups : povray.advanced-users : format of hf_gray_16 .bmp files? : Re: format of hf_gray_16 .bmp files? Server Time
28 Jul 2024 18:16:41 EDT (-0400)
  Re: format of hf_gray_16 .bmp files?  
From: Slime
Date: 8 Jul 2005 00:33:46
Message: <42ce022a$1@news.povray.org>
> You also have to
> write whatever it is that tells POV to treat it as 16-bit grey,
> otherwise POV is going to treat the data as rgb. The POV syntax is the
> same for reading the two types of TGA data, so there must be something
> in the file itself that distinguishes the two situations.

I don't think there is. It just happens that a greyscale image, when read as
though it were 16-bit grey, conveniently produces the expected result. Think
about it: each pixel in a greyscale image contains colors rgb(0,0,0) through
rgb(255,255,255). Discarding the blue channel, we get 0x0000 through 0xffff,
with a full 256 possible numbers within that range, evenly distributed.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.