Use proper endian ordering for bitmaps on OSX.

This commit is contained in:
UnknownShadow200 2015-11-04 12:31:12 +11:00
parent ea92e71747
commit f5d623d820

View File

@ -57,7 +57,7 @@ namespace Launcher2 {
IntPtr colorSpace = OSX.API.CGColorSpaceCreateDeviceRGB(); IntPtr colorSpace = OSX.API.CGColorSpaceCreateDeviceRGB();
IntPtr provider = OSX.API.CGDataProviderCreateWithData( IntPtr.Zero, scan0, size, IntPtr.Zero ); IntPtr provider = OSX.API.CGDataProviderCreateWithData( IntPtr.Zero, scan0, size, IntPtr.Zero );
const uint flags = 4 | (4 << 12); const uint flags = 4 | (2 << 12);
IntPtr image = OSX.API.CGImageCreate( bmp.Width, bmp.Height, 8, 8 * 4, bmp.Stride, IntPtr image = OSX.API.CGImageCreate( bmp.Width, bmp.Height, 8, 8 * 4, bmp.Stride,
colorSpace, flags, provider, IntPtr.Zero, 0, 0 ); colorSpace, flags, provider, IntPtr.Zero, 0, 0 );
IntPtr context = IntPtr.Zero; IntPtr context = IntPtr.Zero;