bitsPerPixel提供错误的值

时间:2014-09-10 08:20:32

标签: objective-c image memory-management pixels cgimageref

我对图像分辨率感到困惑。在我的项目sizeof中返回4.这意味着在一个和下一个像素地址之间是4个字节。换句话说,我有RGBA格式,每个组件1个字节?这样对吗?当我调用CGImageGetBitsPerComponent时,我得到8位(组件为1个字节)。但是当我打电话给CGImageGetBitsPerPixel时,我得到了8位。为什么?我想bitsPerPixel = (count of components) * bitsPerComponent,这等于4个字节。如何获得8位而不是4位?请告诉我一个人。谢谢

0 个答案:

没有答案
相关问题