X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/392e179f4f88a12ea2f01a999ce391577bfce101..f124c9086b8eda2cf3c9d219f931fb293a281ea6:/src/mac/carbon/bitmap.cpp diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 2db229a90f..5abc83eb77 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -802,7 +802,7 @@ wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits bit = x % 8 ; mask = 1 << bit ; - if ( linestart[index] & mask ) + if ( !(linestart[index] & mask ) ) { *destination++ = 0xFF ; *destination++ = 0 ; @@ -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 )