|
|
Am 22.01.2019 um 17:47 schrieb Alain:
> ..hf use the red as the upper, or most significative, 8 bits and green
> as the lower, or least significative, 8 bits of a 16 bits value to be
> used as a height field. The *0.996093 is there as a fudge value to
> prevent clipping at the higher end of the range. The blue channel is
> ignored.
BTW, 0.996093 is 255/256.
The function might also be written as:
hf value = (Red * 255 + Green) / 256
I think for technical reasons the function _should_ be
hf value = (Red * 256 + Green) / 257
but alas! it isn't.
Post a reply to this message
|
|