From d679899e01b6feb478bb910f59ac115afa234a1e Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Thu, 4 Feb 2021 22:35:11 -0800 Subject: [PATCH] Missing x shift --- src/omv/imlib/jpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/omv/imlib/jpeg.c b/src/omv/imlib/jpeg.c index f104c39d4..7defc12b4 100644 --- a/src/omv/imlib/jpeg.c +++ b/src/omv/imlib/jpeg.c @@ -204,6 +204,7 @@ static uint8_t *get_mcu() for (int x=jpeg_enc.x_offset; x<(jpeg_enc.x_offset + dx); x++) { *Y0++ = COLOR_BINARY_TO_GRAYSCALE(IMAGE_GET_BINARY_PIXEL(jpeg_enc.img, x, y)); } + Y0 += (MCU_W - dx); } } else { // full sized (8x8) MCU int iPitch = ((jpeg_enc.img->w + 31) >> 3) & 0xfffc; // dword align