Merge pull request #1154 from kwagyeman/kwabena/fix_jpeg_binary_bug

Fix JPEG Binary Image Compression
This commit is contained in:
Ibrahim Abd Elkader 2021-02-05 20:26:09 +02:00 committed by GitHub
commit 1cf5191c9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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