Mailing List Archive

3.8 Specification Palette color ambiguity
In SetColourMapEntries, are the color values high-justified (most
significant bits) or left-justified (least significant bits -- if so,
how many?)

My guess is high-justified, but the spec leaves this up to the
imagination, so I thought I'd check to make sure.

Sincerely,

jw


--
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world.
Nevertheless, whether we get there willingly or not, we shall soon
have lower consumption rates, because our present rates are
unsustainable.

_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: 3.8 Specification Palette color ambiguity [ In reply to ]
Den 2009-09-24 01:41 skrev Jon Watte:
> In SetColourMapEntries, are the color values high-justified (most
> significant bits) or left-justified (least significant bits -- if so,
> how many?)
>
> My guess is high-justified, but the spec leaves this up to the
> imagination, so I thought I'd check to make sure.
>
> Sincerely,

Huh? All 16 bits are significant. If you want to insert something
with fewer bits (as a server), I suggest you duplicate your bits until
all the bits are filled. E.g. if you have a 5-bit intensity 01001b, I
suggest that you send 01001 01001 01001 0b, or 0x4a52. If you only need
less (as a client), I suggest you grab the most significant bits.

Cheers,
Peter

_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: 3.8 Specification Palette color ambiguity [ In reply to ]
Peter Rosin wrote:
> Den 2009-09-24 01:41 skrev Jon Watte:
>> In SetColourMapEntries, are the color values high-justified (most
>> significant bits) or left-justified (least significant bits -- if so,
>> how many?)
>>
>
> Huh? All 16 bits are significant.

Which means high-justified. However, that simple fact is not actually
written out in the specification. Thus, I suggest it actually is added,
as clarification.

Thanks for the answer!

Sincerely,

jw





--

Revenge is the most pointless and damaging of human desires.


_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: 3.8 Specification Palette color ambiguity [ In reply to ]
Den 2009-09-24 18:29 skrev Jon Watte:
> Peter Rosin wrote:
>> Den 2009-09-24 01:41 skrev Jon Watte:
>>> In SetColourMapEntries, are the color values high-justified (most
>>> significant bits) or left-justified (least significant bits -- if so,
>>> how many?)
>>>
>> Huh? All 16 bits are significant.
>
> Which means high-justified.

And low-justified. And centered. *All* bits are significant. You should
think about why you are not arguing for similar language for e.g.
red-max in PIXEL_FORMAT?

> Thanks for the answer!

You're welcome!

Cheers,
Peter


_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: 3.8 Specification Palette color ambiguity [ In reply to ]
Peter Rosin wrote:
>>> Huh? All 16 bits are significant.
>>
>> Which means high-justified.
>
> And low-justified. And centered. *All* bits are significant. You should
> think about why you are not arguing for similar language for e.g.
> red-max in PIXEL_FORMAT?
>

I'm not arguing for PIXEL_FORMAT because both the shift and the mask is
well defined. One way to explain Color would be to say that the shift
is 0 and the mask is 0xffff; that'd be clear and unambiguous no matter
what the context.

The reason I think this is not clear, is that there are so many
different graphics specs all over the technology spectrum, and some of
them only use the lower bits, based on what the resolution is -- for a
5:6:5 format, they'd use the lower 5 bits of red and blue, and the lower
6 bits of green. You can't assume that just because you think the way it
current is defined is "right," (and I would agree) there won't be some
other context within which a loose definition wouldn't be confusing.

Sincerely,

jw



--

Revenge is the most pointless and damaging of human desires.


_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list