]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/utilscocoa.mm
Make BOM-detection code in wxConvAuto public.
[wxWidgets.git] / src / osx / carbon / utilscocoa.mm
index 438a024c42944c5fc5e6ed43f560ba5281ab85d2..dc4248f3c7b0b115c433ebc03783028c24c25791 100644 (file)
@@ -413,8 +413,7 @@ CGImageRef wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage )
     if (nsimage != nil)
     {
         NSSize imageSize = [nsimage size];
-        CGColorSpaceRef genericRGB = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); 
-        CGContextRef context = CGBitmapContextCreate(NULL, imageSize.width, imageSize.height, 8, 0, genericRGB, kCGImageAlphaPremultipliedFirst); 
+        CGContextRef context = CGBitmapContextCreate(NULL, imageSize.width, imageSize.height, 8, 0, wxMacGetGenericRGBColorSpace(), kCGImageAlphaPremultipliedFirst); 
         NSGraphicsContext *nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO];
         [NSGraphicsContext saveGraphicsState];
         [NSGraphicsContext setCurrentContext:nsGraphicsContext];