diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-03 19:20:45 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-03 19:20:45 (GMT) |
commit | 0e4d264d34b56b01b93c6ef3d3cbb1337d8d5982 (patch) | |
tree | a5c1af9a82c7d63634f33bfe6eb5c64e0b1f6669 | |
parent | cd026d544367512db80eed7ea948c68b2e0ff623 (diff) | |
parent | c0764ea9cc2d2af68135605eda1a8214d0afa571 (diff) | |
download | tk-0e4d264d34b56b01b93c6ef3d3cbb1337d8d5982.zip tk-0e4d264d34b56b01b93c6ef3d3cbb1337d8d5982.tar.gz tk-0e4d264d34b56b01b93c6ef3d3cbb1337d8d5982.tar.bz2 |
Merge 8.6
-rw-r--r-- | macosx/tkMacOSXImage.c | 8 |
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( |