Skip to content

Commit

Permalink
Fixed bug 1377 - SDL_image 1.2.11 corrupts png of PseudoClass type 8bit
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 20, 2012
1 parent a320dbc commit c0ebd34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES
@@ -1,3 +1,7 @@
1.2.12:
Sam Lantinga - Thu Jan 19 23:18:09 EST 2012
* Fixed loading 8-bit PNG images with libpng

1.2.11:
Sam Lantinga - Sat Jan 14 17:54:38 EST 2012
* Fixed loading 8-bit PNG images on Mac OS X
Expand Down
3 changes: 0 additions & 3 deletions IMG_png.c
Expand Up @@ -453,9 +453,6 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
/* Allocate the SDL surface to hold the image */
Rmask = Gmask = Bmask = Amask = 0 ;
num_channels = lib.png_get_channels(png_ptr, info_ptr);
/* Some .png files are monochrome, with as much as 1 channel and 1 bit per pixel */
if( num_channels != 3 && num_channels != 4 )
num_channels = 3;
if ( color_type != PNG_COLOR_TYPE_PALETTE ) {
if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) {
Rmask = 0x000000FF;
Expand Down

0 comments on commit c0ebd34

Please sign in to comment.