using common colorspace method
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -413,8 +413,7 @@ CGImageRef wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage )
|
|||||||
if (nsimage != nil)
|
if (nsimage != nil)
|
||||||
{
|
{
|
||||||
NSSize imageSize = [nsimage size];
|
NSSize imageSize = [nsimage size];
|
||||||
CGColorSpaceRef genericRGB = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
|
CGContextRef context = CGBitmapContextCreate(NULL, imageSize.width, imageSize.height, 8, 0, wxMacGetGenericRGBColorSpace(), kCGImageAlphaPremultipliedFirst);
|
||||||
CGContextRef context = CGBitmapContextCreate(NULL, imageSize.width, imageSize.height, 8, 0, genericRGB, kCGImageAlphaPremultipliedFirst);
|
|
||||||
NSGraphicsContext *nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO];
|
NSGraphicsContext *nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO];
|
||||||
[NSGraphicsContext saveGraphicsState];
|
[NSGraphicsContext saveGraphicsState];
|
||||||
[NSGraphicsContext setCurrentContext:nsGraphicsContext];
|
[NSGraphicsContext setCurrentContext:nsGraphicsContext];
|
||||||
|
Reference in New Issue
Block a user