I have a b/w/r display (GDEW075Z08) that I would like to render an image to, from a server.
Due to the way the images are produced (python pillow, which doesn't support 2bpp bitmaps pillow color-depths) and to save data transferred, the server hosts two bitmaps of colour depth 1; one for the black channel and one for the red.
I have code working to download the image, process the header etc (thanks to good example code @ZinggJM).
I notice one can call virtual void writeImage(const uint8_t* black, const uint8_t* color, ...);
with black or color as nullptr without error.
So my plan was to:
Download the black.bmp
Call writeImage(black, nullptr, ...)
Download the red.bmp
Call writeImage(nullptr, red, ...)
But this doesn't work, whichever of black or red is called last is the only image shown, as if the nullptr leads to that channel being zeroed out.
Is there a way to call writeImage (or similar function) to write one channel at a time, without zeroing out the others?
Otherwise I can create a 2bpp bitmap as a post-processing step or host the raw byte data interleaved. I was just curious if there is a way to do what I describe above.
But with some simple programming skill, you should be able to adapt the writeImage() method of the driver class to your needs. Takes less time to study and modify, than to writing the above post!
-jz-
I see _writeCommand(0x10)here here which looks like it might be the command for selecting the black channel. Is that right?
Where can one find a list of these commands (some of which you have helpfully commented)?
I see also the data is defaulted to 0xFFhere, so that's what I'd need to change.
My skillset is better suited to rearrange the hosted data though - I think I'll be faster at that. I'll leave these links for posterity though and I appreciate the fast response above, thanks.