diff options
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qnativeimage.cpp | 7 | ||||
-rw-r--r-- | src/gui/image/qnativeimage_p.h | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index e3fb27a..a716eb1 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -232,14 +232,16 @@ QImage::Format QNativeImage::systemFormat() QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /* isTextBuffer */, QWidget *widget) : image(width, height, format) { - cgColorSpace = QCoreGraphicsPaintEngine::macDisplayColorSpace(widget); + + uint cgflags = kCGImageAlphaNoneSkipFirst; #ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version cgflags |= kCGBitmapByteOrder32Host; #endif - cg = CGBitmapContextCreate(image.bits(), width, height, 8, image.bytesPerLine(), cgColorSpace, cgflags); + cg = CGBitmapContextCreate(image.bits(), width, height, 8, image.bytesPerLine(), + QCoreGraphicsPaintEngine::macDisplayColorSpace(widget), cgflags); CGContextTranslateCTM(cg, 0, height); CGContextScaleCTM(cg, 1, -1); @@ -251,7 +253,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /* QNativeImage::~QNativeImage() { CGContextRelease(cg); - CGColorSpaceRelease(cgColorSpace); } QImage::Format QNativeImage::systemFormat() diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h index f0c3688..268fe49 100644 --- a/src/gui/image/qnativeimage_p.h +++ b/src/gui/image/qnativeimage_p.h @@ -95,7 +95,6 @@ public: #elif defined(Q_WS_MAC) CGContextRef cg; - CGColorSpaceRef cgColorSpace; #endif private: |