Problem about SSD1351 device color format converting
See original GitHub issueClass: luma.oled.device.ssd1351 Funtion: display
Origin:
for r, g, b in self.framebuffer.getdata():
if not(r == g == b == 0):
# 65K format 1
buf[i] = r & 0xF8 | g >> 5
buf[i + 1] = g << 5 & 0xE0 | b >> 3
i += 2
This code try to convert color RGB(888) to color 65K(565) Convert: rrrrrrrr,gggggggg,bbbbbbbb -> rrrrr ggg,ggg bbbbb when deal with the green byte, bit 76543210 should be convert to 765,432 but actually we get 765,210, the green color changed randomly.
The correct code is:
for r, g, b in self.framebuffer.getdata():
if not(r == g == b == 0):
# 65K format 1
buf[i] = r & 0xF8 | g >> 5
buf[i + 1] = g << 3 & 0xE0 | b >> 3
i += 2
green byte just need to left shift by 3, not 5
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
OLED 128x128 is not displaying correctly the colors
I'm having trouble using the OLED SSD1351 ...
Read more >Color conversion and ink management (Acrobat Pro)
This conversion is applied to all untagged spaces, RGB, CMYK and grayscale, whether stand-alone or as alternate value for spot colors. Objects ...
Read more >Best Practices for Color Management in OS X and iOS
You can convert color from one color space to another through a mathematical conversion called gamut mapping, but it really depends on which ......
Read more >Optimized SSD1351 library with buffering [Archive]
The fastest frame rate achievable is about 80fps, using no buffering and low colour mode, writing a solid colour to the screen. In...
Read more >Color management - Affinity Online Help
As not all devices can display the same color gamut it can lead to colors ... (Color option), check the Convert opened files...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
2.5.1 released onto PyPi with this fix in
also note that SSD1331 driver is similarly affected