Update GBViewController.m

Use CGDataProviderCreateWithCFData instead of CGDataProviderCreateWithData.
This commit is contained in:
C.W. Betts 2025-07-07 13:52:02 -06:00 committed by GitHub
parent 4abb5f3539
commit 1157ff0f36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1390,7 +1390,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
- (UIImage *)imageFromData:(NSData *)data width:(unsigned)width height:(unsigned)height
{
/* Convert the screenshot to a CGImageRef */
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, data.bytes, data.length, NULL);
CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef)data);
CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault | kCGImageAlphaNoneSkipLast;
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;