You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
ImageView app: add support for grayscale images
This commit is contained in:
@@ -214,7 +214,9 @@ class ImageView(Activity):
|
||||
print(f"Raw image has width: {width}, Height: {height}, Color Format: {color_format}")
|
||||
stride = width * 2
|
||||
cf = lv.COLOR_FORMAT.RGB565
|
||||
if color_format != "RGB565":
|
||||
if color_format == "GRAY":
|
||||
cf = lv.COLOR_FORMAT.L8
|
||||
else:
|
||||
print(f"WARNING: unknown color format {color_format}, assuming RGB565...")
|
||||
self.current_image_dsc = lv.image_dsc_t({
|
||||
"header": {
|
||||
|
||||
Reference in New Issue
Block a user