You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got error message in console: "<Error>: CGBitmapContextCreate: unsupported parameter combination: set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see the details"
#35
Closed
vkaramov opened this issue
Oct 29, 2015
· 5 comments
: CGBitmapContextCreate: unsupported parameter combination: set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see the details
After setting CGBITMAP_CONTEXT_LOG_ERRORS environment variable, I got more detailed info:
:
CGBitmapContextCreate: unsupported parameter combination:
16 integer bits/component;
64 bits/pixel;
RGB color space model; kCGImageAlphaLast;
1760 bytes/row.
Valid parameters for RGB color space model are:
16 bits per pixel, 5 bits per component, kCGImageAlphaNoneSkipFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaNoneSkipFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaNoneSkipLast
32 bits per pixel, 8 bits per component, kCGImageAlphaPremultipliedFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaPremultipliedLast
64 bits per pixel, 16 bits per component, kCGImageAlphaPremultipliedLast
64 bits per pixel, 16 bits per component, kCGImageAlphaNoneSkipLast
128 bits per pixel, 32 bits per component, kCGImageAlphaNoneSkipLast |kCGBitmapFloatComponents
128 bits per pixel, 32 bits per component, kCGImageAlphaPremultipliedLast |kCGBitmapFloatComponents
See Quartz 2D Programming Guide (available online) for more information.
Environment: iOS 9.0 simulator, Xcode 7.1.
The text was updated successfully, but these errors were encountered:
vkaramov
pushed a commit
to vkaramov/Nuke
that referenced
this issue
Oct 29, 2015
64 bpp, 16 bpc, kCGImageAlphaLast (what image data tells us) is not supported
64 bpp, 16 bpc, kCGImageAlphaPremultipliedFirst (that I mention in a PR) is not supported either
As far as I can tell we should simply draw all images using the same pixel format which is best for rendering (for instance, 32 bbp, 8 bpc, kCGImageAlphaPremultipliedLast). End users should be able to easily alter this behaviour by implementing custom image decompressors.
// See Quartz 2D Programming Guide for more info
guard let contextRef =CGBitmapContextCreate(nil,Int(imageSize.width),Int(imageSize.height),8,0,CGColorSpaceCreateDeviceRGB(),CGImageAlphaInfo.PremultipliedLast.rawValue)else{return image
}
I've found the same issue that SDWebImage had. When trying to show image like that http://7xngft.com2.z0.glb.qiniucdn.com/thn.jpg I've got an error message:
: CGBitmapContextCreate: unsupported parameter combination: set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see the details
After setting CGBITMAP_CONTEXT_LOG_ERRORS environment variable, I got more detailed info:
:
CGBitmapContextCreate: unsupported parameter combination:
16 integer bits/component;
64 bits/pixel;
RGB color space model; kCGImageAlphaLast;
1760 bytes/row.
Valid parameters for RGB color space model are:
16 bits per pixel, 5 bits per component, kCGImageAlphaNoneSkipFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaNoneSkipFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaNoneSkipLast
32 bits per pixel, 8 bits per component, kCGImageAlphaPremultipliedFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaPremultipliedLast
64 bits per pixel, 16 bits per component, kCGImageAlphaPremultipliedLast
64 bits per pixel, 16 bits per component, kCGImageAlphaNoneSkipLast
128 bits per pixel, 32 bits per component, kCGImageAlphaNoneSkipLast |kCGBitmapFloatComponents
128 bits per pixel, 32 bits per component, kCGImageAlphaPremultipliedLast |kCGBitmapFloatComponents
See Quartz 2D Programming Guide (available online) for more information.
Environment: iOS 9.0 simulator, Xcode 7.1.
The text was updated successfully, but these errors were encountered: