+#if defined(__WXMSW__)
+ // under MSW the RGB components are reversed, they're in BGR order
+ typedef wxPixelFormat<unsigned char, 24, 2, 1, 0> wxNativePixelFormat;
+
+ #define wxPIXEL_FORMAT_ALPHA 3
+#elif defined(__WXMAC__)
+ // under Mac, first component is unused but still present, hence we use
+ // 32bpp, not 24
+ typedef wxPixelFormat<unsigned char, 32, 1, 2, 3> wxNativePixelFormat;
+
+ #define wxPIXEL_FORMAT_ALPHA 0
+#elif defined(__WXCOCOA__)
+ // Cocoa is standard RGB or RGBA (normally it is RGBA)
+ typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat;
+
+ #define wxPIXEL_FORMAT_ALPHA 3
+#elif defined(__WXGTK__)
+ // Under GTK+ 2.X we use GdkPixbuf, which is standard RGB or RGBA
+ typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat;
+
+ #define wxPIXEL_FORMAT_ALPHA 3
+#elif defined(__WXDFB__)
+ // Under DirectFB, RGB components are reversed, they're in BGR order
+ typedef wxPixelFormat<unsigned char, 24, 2, 1, 0> wxNativePixelFormat;
+
+ #define wxPIXEL_FORMAT_ALPHA 3
+#endif