Prerequisites
Please confirm the following:
Describe the bug
When rendering images on a Waveshare Spectra 6 (E6) multi-color display, the Red and Blue color channels are swapped. This results in blue areas of a source image displaying as orange/red on the physical e-ink panel.
This happens because the Pillow library processes and outputs images in RGB format, but the underlying Waveshare hardware driver expects the image buffer to be in BGR format. Currently, waveshare_display.py passes the RGB image directly to getbuffer() without reordering the channels.
Expected behavior
The colors rendered on the e-ink display should accurately reflect the source image without the red and blue channels being inverted.
To Reproduce
Steps to reproduce the behavior:
- Configure InkyPi to use a Waveshare Spectra 6 display (e.g.,
epd7in3e).
- Upload or display an image that contains prominent blue colors.
- Wait for the screen to refresh.
- Observe that the blue areas render as orange/red on the physical display.
Logs
No crash or error logs are generated, as this is a visual rendering/color mapping bug, not a runtime exception. The service continues to run normally.
Additional context
- Hardware: Raspberry Pi Zero W 2, Waveshare 7.3" Spectra 6 (E6) Display.
- Local Fix Applied: I was able to fix this locally by intercepting the image right before it converts to the buffer and manually swapping the channels.
In src/display/waveshare_display.py inside the display_image function (around line 130), I added this block just before if not self.bi_color_display::
# --- BGR Swap Fix ---
if image.mode == "RGB":
r, g, b = image.split()
image = Image.merge("RGB", (b, g, r))
elif image.mode == "RGBA":
r, g, b, a = image.split()
image = Image.merge("RGBA", (b, g, r, a))
# --------------------
Prerequisites
Please confirm the following:
Describe the bug
When rendering images on a Waveshare Spectra 6 (E6) multi-color display, the Red and Blue color channels are swapped. This results in blue areas of a source image displaying as orange/red on the physical e-ink panel.
This happens because the
Pillowlibrary processes and outputs images in RGB format, but the underlying Waveshare hardware driver expects the image buffer to be in BGR format. Currently,waveshare_display.pypasses the RGB image directly togetbuffer()without reordering the channels.Expected behavior
The colors rendered on the e-ink display should accurately reflect the source image without the red and blue channels being inverted.
To Reproduce
Steps to reproduce the behavior:
epd7in3e).Logs
No crash or error logs are generated, as this is a visual rendering/color mapping bug, not a runtime exception. The service continues to run normally.
Additional context
In
src/display/waveshare_display.pyinside thedisplay_imagefunction (around line 130), I added this block just beforeif not self.bi_color_display::