我正在尝试创建一个 8 位灰度上下文,如下所示:
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
CGContextRef context = CGBitmapContextCreate(
data, m_width, m_height, 8, m_width, colorSpace,
kCGBitmapByteOrder32Little|kCGImageAlphaNone);
但我有以下错误:
CGBitmapContextCreate: unsupported parameter combination:
8 integer bits/component; 8 bits/pixel; 1-component color space;
kCGImageAlphaNone; 1936 bytes/row.
为什么不支持这种组合?