Fix loading of Grayscale + Alpha PNG's

This commit is contained in:
Thomas Bernard 2019-06-29 10:25:17 +02:00
parent b4abb9edff
commit a59aab8a31

View File

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