The Gimp puts out a different bogus color mask for 32-bit .bmp files. :)
authorRyan C. Gordon <icculus@icculus.org>
Wed, 09 Jul 2014 00:09:57 -0400
changeset 9001 c750aab87e82
parent 9000 670efcbd447d
child 9002 c1bd00f50724
The Gimp puts out a different bogus color mask for 32-bit .bmp files. :)
src/video/SDL_bmp.c
--- a/src/video/SDL_bmp.c	Wed Jul 09 00:01:34 2014 -0400
+++ b/src/video/SDL_bmp.c	Wed Jul 09 00:09:57 2014 -0400
@@ -254,6 +254,13 @@
                 Rmask = 0x00FF0000;
                 Gmask = 0x0000FF00;
                 Bmask = 0x000000FF;
+            } else if ((Rmask == 0xFFFFFF00) && (Gmask == 0xFFFFFF00) &&
+                       (Bmask == 0xFFFFFF00) && (Amask == 0xFFFFFF00) ) {
+                /* argh, The Gimp seems to put out different bogus masks! */
+                Amask = 0x000000FF;
+                Rmask = 0xFF000000;
+                Gmask = 0x00FF0000;
+                Bmask = 0x0000FF00;
             }
 
             break;