Skip to content

Commit 4928cef

Browse files
committed
Inky 7.3: Add pen type to JPEGDEC.
1 parent 1659139 commit 4928cef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

micropython/modules/jpegdec/jpegdec.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ MICROPY_EVENT_POLL_HOOK
145145
} else if (current_graphics->pen_type == PicoGraphics::PEN_RGB888) {
146146
current_graphics->set_pen(RGB((RGB565)pDraw->pPixels[i]).to_rgb888());
147147
current_graphics->pixel({pDraw->x + x, pDraw->y + y});
148-
} else if (current_graphics->pen_type == PicoGraphics::PEN_P8 || current_graphics->pen_type == PicoGraphics::PEN_P4 || current_graphics->pen_type == PicoGraphics::PEN_3BIT) {
148+
} else if (current_graphics->pen_type == PicoGraphics::PEN_P8
149+
|| current_graphics->pen_type == PicoGraphics::PEN_P4
150+
|| current_graphics->pen_type == PicoGraphics::PEN_3BIT
151+
|| current_graphics->pen_type == PicoGraphics::PEN_INKY7) {
149152
current_graphics->set_pixel_dither({pDraw->x + x, pDraw->y + y}, RGB((RGB565)pDraw->pPixels[i]));
150153
} else {
151154
current_graphics->set_pen(pDraw->pPixels[i]);
@@ -262,6 +265,7 @@ mp_obj_t _JPEG_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args
262265
case PicoGraphics::PEN_P8:
263266
case PicoGraphics::PEN_P4:
264267
case PicoGraphics::PEN_3BIT:
268+
case PicoGraphics::PEN_INKY7:
265269
self->jpeg->setPixelType(RGB565_BIG_ENDIAN);
266270
break;
267271
// TODO 2-bit is currently unsupported

0 commit comments

Comments
 (0)