Repository navigation
CDisplay::SetArea - what colour format are the pixels in? #747
Replies: 2 comments 1 reply
|
Never mind. I have written my own raw pixel data out as part of the test suite for it, and there seems to be some discrepancy as to whether LE or BE is correct. Apologies. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Writing a driver for the RoboPeak RPUSBDISP display, which uses a 16 bit depth model, allegedly it is RGB565. Obviously, the output side is using CDisplay as a base class, and I am providing the relevant overrides.
However, I am a little perplexed by the colour handling. I assumed that the pPixels parameter was pointing to a block of data which, for a display that has 16 bit depth, is effectively a set of u16 values. Since all my pixels line up correctly, and rectangles appear rectangular, I assume that this is correct. However, I am not convinced that I have the colour bits in the right places, as a simple button example shows the button (unpressed) as orange, and pressed as brown.
Simple question: is the pixel data already in the correct colour model for the CDisplay object? Looking at the examples in display/addon, I would assume so, which implies that I have RGB565, and it should be RGB565_BE. Does this make sense?
(It is frustrating that I have successfully interpreted what little documentation there is for the display, including the fact it allows you to compress a stream of pixels using RLE, but I cannot get the colour correct - probably not helped by the fact I am colour-blind, so had to check with someone else what was on the screen!)
All reactions