From a59aab8a31b9b9326f063e5f285831527e3327d8 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 29 Jun 2019 10:25:17 +0200 Subject: [PATCH] Fix loading of Grayscale + Alpha PNG's --- src/fileformats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fileformats.c b/src/fileformats.c index d91bcbaa..0ce921e4 100644 --- a/src/fileformats.c +++ b/src/fileformats.c @@ -6527,7 +6527,8 @@ void Load_PNG_Sub(T_IO_Context * context, FILE * file, const char * memory_buffe switch (color_type) { case PNG_COLOR_TYPE_GRAY_ALPHA: - bpp = bit_depth * 2; + //bpp = bit_depth * 2; + bpp = bit_depth; // no more than 8bpp or else we enable true color picture loading break; case PNG_COLOR_TYPE_RGB: bpp = bit_depth * 3;