GxEPD2 writeImage for 3 colour display in two passes?

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.

Hi @matt_pellegrini , welcome to the forum!

No, there is no such method available.

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 0xFF here, 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.

// Panel: GDEW075Z08 : http://www.e-paper-display.com/products_detail/productId=457.html
// Controller: GD7965 : http://www.e-paper-display.com/download_detail/downloadsId=821.html

Hint: you could make the whole code-block from

  _writeCommand(0x10);
  _startTransfer();

to

  _endTransfer();

conditional.
and also from

  _writeCommand(0x13);
  _startTransfer();

to

  _endTransfer();

Thanks, I jumped straight to the writeImage method and missed this link.

That does have all the command codes and 0x10 is indeed the start of black data transfer.

This definitely feels doable - let's see if I can make it happen.

Thanks for the help and hints.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.