We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 733ac89 + 2812c16 commit 20788a0Copy full SHA for 20788a0
1 file changed
src/raw_framebuf.rs
@@ -86,6 +86,17 @@ impl IntoRawBytes for embedded_graphics::pixelcolor::Rgb565 {
86
}
87
88
89
+impl IntoRawBytes for embedded_graphics::pixelcolor::Rgb666 {
90
+ const BYTES_PER_PIXEL: usize = 3;
91
+ type Raw = [u8; 3];
92
+
93
+ //scale up by 8bits/ 6bits = 256/64 = 4
94
+ fn into_raw_bytes(self) -> <Self as IntoRawBytes>::Raw {
95
+ [self.r()* 4, self.g() *4, self.b()*4]
96
+ }
97
+}
98
99
100
impl IntoRawBytes for embedded_graphics::pixelcolor::Rgb888 {
101
const BYTES_PER_PIXEL: usize = 3;
102
type Raw = [u8; 3];
0 commit comments