summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/tkMacOSXImage.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index a30302a..5a79acd 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -121,13 +121,12 @@ static void ReleaseData(
static CGImageRef
TkMacOSXCreateCGImageWithXImage(
XImage *image,
- uint32_t alphaInfo)
+ uint32_t bitmapInfo)
{
CGImageRef img = NULL;
size_t bitsPerComponent, bitsPerPixel;
size_t len = image->bytes_per_line * image->height;
const CGFloat *decode = NULL;
- CGBitmapInfo bitmapInfo;
CGDataProviderRef provider = NULL;
char *data = NULL;
CGDataProviderReleaseDataCallback releaseData = ReleaseData;
@@ -183,7 +182,6 @@ TkMacOSXCreateCGImageWithXImage(
CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB();
bitsPerComponent = 8;
bitsPerPixel = 32;
- bitmapInfo = kCGBitmapByteOrder32Big | alphaInfo;
data = (char *)ckalloc(len);
if (data) {
memcpy(data, image->data + image->xoffset, len);
@@ -483,8 +481,8 @@ XCreateImage(
*----------------------------------------------------------------------
*/
-#define USE_ALPHA kCGImageAlphaLast
-#define IGNORE_ALPHA kCGImageAlphaNoneSkipLast
+#define USE_ALPHA (kCGImageAlphaLast | kCGBitmapByteOrder32Big)
+#define IGNORE_ALPHA (kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little)
static int
TkMacOSXPutImage(