From 5d90a8375a1393abc0dc5f8cc9f1ac9fd9ae6530 Mon Sep 17 00:00:00 2001 From: Mikhail Morozov Date: Fri, 8 Jun 2018 07:29:00 +0300 Subject: [PATCH] stb_image: fix 1-bit bmp --- stb_image.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stb_image.h b/stb_image.h index d9c21bc..75f1d44 100644 --- a/stb_image.h +++ b/stb_image.h @@ -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][1]; out[z++] = pal[color][2]; + if (target == 4) out[z++] = 255; + if (i+1 == (int) s->img_x) break; if((--bit_offset) < 0) { bit_offset = 7; v = stbi__get8(s);