ImageView app: add support for grayscale images

This commit is contained in:
Thomas Farstrike
2025-11-30 15:29:20 +01:00
parent 8819afd80a
commit 059e1e51ea
@@ -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": {