stb_image: fix 1-bit bmp

This commit is contained in:
Mikhail Morozov 2018-06-08 07:29:00 +03:00
parent fa8fe30532
commit 5d90a8375a
1 changed files with 2 additions and 0 deletions

View File

@ -5207,6 +5207,8 @@ static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req
out[z++] = pal[color][0]; out[z++] = pal[color][0];
out[z++] = pal[color][1]; out[z++] = pal[color][1];
out[z++] = pal[color][2]; out[z++] = pal[color][2];
if (target == 4) out[z++] = 255;
if (i+1 == (int) s->img_x) break;
if((--bit_offset) < 0) { if((--bit_offset) < 0) {
bit_offset = 7; bit_offset = 7;
v = stbi__get8(s); v = stbi__get8(s);