diff --git a/micropython/modules/jpegdec/jpegdec.cpp b/micropython/modules/jpegdec/jpegdec.cpp index 7e0eb208..df54948a 100644 --- a/micropython/modules/jpegdec/jpegdec.cpp +++ b/micropython/modules/jpegdec/jpegdec.cpp @@ -159,6 +159,9 @@ MICROPY_EVENT_POLL_HOOK } else { current_graphics->set_pixel_dither({pDraw->x + x, pDraw->y + y}, RGB((RGB565)pDraw->pPixels[i])); } + } else if (current_graphics->pen_type == PicoGraphics::PEN_DV_RGB555) { + current_graphics->set_pen(RGB((RGB565)pDraw->pPixels[i]).to_rgb555()); + current_graphics->pixel({pDraw->x + x, pDraw->y + y}); } else { current_graphics->set_pen(pDraw->pPixels[i]); current_graphics->pixel({pDraw->x + x, pDraw->y + y}); @@ -273,6 +276,7 @@ mp_obj_t _JPEG_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args case PicoGraphics::PEN_P4: case PicoGraphics::PEN_3BIT: case PicoGraphics::PEN_INKY7: + case PicoGraphics::PEN_DV_RGB555: self->jpeg->setPixelType(RGB565_BIG_ENDIAN); break; // TODO 2-bit is currently unsupported