Skip to content

Commit

Permalink
Merge 8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Dec 3, 2023
2 parents cd026d5 + c0764ea commit 0e4d264
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions macosx/tkMacOSXImage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 0e4d264

Please sign in to comment.