src/video/SDL_bmp.c
changeset 9000 670efcbd447d
parent 8675 7680f784d850
child 9001 c750aab87e82
     1.1 --- a/src/video/SDL_bmp.c	Tue Jul 08 16:17:06 2014 -0400
     1.2 +++ b/src/video/SDL_bmp.c	Wed Jul 09 00:01:34 2014 -0400
     1.3 @@ -246,6 +246,16 @@
     1.4              Gmask = SDL_ReadLE32(src);
     1.5              Bmask = SDL_ReadLE32(src);
     1.6              Amask = SDL_ReadLE32(src);
     1.7 +
     1.8 +            /* ImageMagick seems to put out bogus masks here. Pick a default. */
     1.9 +            if ((Rmask == 0xFFFFFF) && (Gmask == 0xFFFFFF) &&
    1.10 +                (Bmask == 0xFFFFFF) && (Amask == 0xFFFFFF) ) {
    1.11 +                Amask = 0xFF000000;
    1.12 +                Rmask = 0x00FF0000;
    1.13 +                Gmask = 0x0000FF00;
    1.14 +                Bmask = 0x000000FF;
    1.15 +            }
    1.16 +
    1.17              break;
    1.18          default:
    1.19              break;