]> git.saurik.com Git - wxWidgets.git/commitdiff
using common colorspace method
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 9 Jun 2011 00:30:26 +0000 (00:30 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 9 Jun 2011 00:30:26 +0000 (00:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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];