tar*_*mes 7 macos core-graphics
我在创建位图上下文时遇到此错误:
CGBitmapContextCreate:不支持的参数组合:8个整数位/组件; 24位/像素; 3组分色彩空间; kCGImageAlphaNone; 7936字节/行.
这是代码(请注意,上下文基于现有CGImage的参数:
context = CGBitmapContextCreate(NULL,
(int)pi.bufferSizeRequired.width,
(int)pi.bufferSizeRequired.height,
CGImageGetBitsPerComponent(imageRef),
0,
CGImageGetColorSpace(imageRef),
CGImageGetBitmapInfo(imageRef));
Run Code Online (Sandbox Code Playgroud)
宽度为2626,高度为3981.我将bytesPerRow保留为零,以便自动为我计算,并且它自己选择7936.
那么,地球上的不一致是什么?这让我疯了.
| 归档时间: |
|
| 查看次数: |
7683 次 |
| 最近记录: |