--- IMG_png.c.orig 2013-03-06 16:00:15.308563360 +0100 +++ IMG_png.c 2013-03-06 16:02:06.680563289 +0100 @@ -453,7 +453,8 @@ /* Allocate the SDL surface to hold the image */ Rmask = Gmask = Bmask = Amask = 0 ; num_channels = lib.png_get_channels(png_ptr, info_ptr); - if ( color_type != PNG_COLOR_TYPE_PALETTE ) { + if ( color_type != PNG_COLOR_TYPE_PALETTE + && color_type != PNG_COLOR_TYPE_GRAY ) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN Rmask = 0x000000FF; Gmask = 0x0000FF00;