]> git.saurik.com Git - wxWidgets.git/commitdiff
intel endian fix
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 10 Feb 2006 17:40:25 +0000 (17:40 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 10 Feb 2006 17:40:25 +0000 (17:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/bitmap.cpp

index 02e6c39d6cbd55630ff4c17d4e8ca1fb548f5ae9..5abc83eb77d8704a28aa31a21159cc36228d64eb 100644 (file)
@@ -1146,11 +1146,17 @@ wxImage wxBitmap::ConvertToImage() const
         for (int xx = 0; xx < width; xx++)
         {
             color = *((long*) source) ;
+#ifdef WORDS_BIGENDIAN
             a = ((color&0xFF000000) >> 24) ;
             r = ((color&0x00FF0000) >> 16) ;
             g = ((color&0x0000FF00) >> 8) ;
             b = (color&0x000000FF);
-
+#else
+            b = ((color&0xFF000000) >> 24) ;
+            g = ((color&0x00FF0000) >> 16) ;
+            r = ((color&0x0000FF00) >> 8) ;
+            a = (color&0x000000FF);
+#endif
             if ( hasMask )
             {
                 if ( *maskp++ == 0xFF )