src/video/SDL_bmp.c
changeset 9000 670efcbd447d
parent 8675 7680f784d850
child 9001 c750aab87e82
equal deleted inserted replaced
8999:c6398920a9ca 9000:670efcbd447d
   244         case 32:
   244         case 32:
   245             Rmask = SDL_ReadLE32(src);
   245             Rmask = SDL_ReadLE32(src);
   246             Gmask = SDL_ReadLE32(src);
   246             Gmask = SDL_ReadLE32(src);
   247             Bmask = SDL_ReadLE32(src);
   247             Bmask = SDL_ReadLE32(src);
   248             Amask = SDL_ReadLE32(src);
   248             Amask = SDL_ReadLE32(src);
       
   249 
       
   250             /* ImageMagick seems to put out bogus masks here. Pick a default. */
       
   251             if ((Rmask == 0xFFFFFF) && (Gmask == 0xFFFFFF) &&
       
   252                 (Bmask == 0xFFFFFF) && (Amask == 0xFFFFFF) ) {
       
   253                 Amask = 0xFF000000;
       
   254                 Rmask = 0x00FF0000;
       
   255                 Gmask = 0x0000FF00;
       
   256                 Bmask = 0x000000FF;
       
   257             }
       
   258 
   249             break;
   259             break;
   250         default:
   260         default:
   251             break;
   261             break;
   252         }
   262         }
   253         break;
   263         break;