On Thu, 18 Apr 2002, Herbert Voss wrote:

> if we want to build up a 16bit color correct to
> a 8 bit one than we cannot do only a shift of
> 8 bit to get the high or low byte.

This is a very good approximation.

> we had to take every second _bit_ from the original one. Or
> every third if it's a 24 bit one. And for a 4 bit we
> have to double the bits, not only shifting the
> whole nibble.

This is wrong.

> I suppose, that xpm uses the same color modell
> than all the other ones, but I'm not really sure.
> so maybe that I'm wrong here

You are both using a RGB color model, but this is not relevant.
Even with a HSL or Munsell color space, the transformation would
be the same: You want the Most Significant Bits.
Why? Because you loose more information by dropping more significant
bits.

So, you should take the upper 8 bits, and if you want to do better
than that, round according to the 7th bit.

If you do not believe me, try to convert a photo with colors using
both approaches, and see for yourselves.

Greets,

Asger

Reply via email to