kCGBitmapByteOrderDefault = (0 << 12)
据我所知,这意味着位移零12次……仍为零.我错过了什么?@H_@R_301_449@_4@
The byte order constants specify the byte ordering of pixel formats. @H_@R_301_449@_4@
…If the code is not written correctly,it’s possible to misread the data which leads to colors or alpha that appear wrong.@H_@R_301_449@_4@
kCGBitmapByteOrder的各种常量主要映射到CGImageByteOrder中类似命名的常量,它没有“默认值”.@H_@R_301_449@_4@
这些值详见in the docs for CGImageByteOrderInfo
@H_@R_301_449@_4@
您询问的是默认值,正如您所注意到的那样,位移0仍为0,但正如Rob所说,前面/后面的位仍然很重要.@H_@R_301_449@_4@
您缺少的是其他选项:@H_@R_301_449@_4@
kCGBitmapByteOrder16Little =(1 << 12)
16位小端格式.@H_@R_301_449@_4@
kCGBitmapByteOrder32Little =(2<< 12)
32位小端格式.@H_@R_301_449@_4@
kCGBitmapByteOrder16Big =(3<< 12)
16位,大端格式.@H_@R_301_449@_4@
kCGBitmapByteOrder32Big =(4<< 12)
32位,大端格式.@H_@R_301_449@_4@
它们使用不同的值,具体取决于16位与32位图像,以及您是否首先关注最小或最重要的数字.@H_@R_301_449@_4@
“默认”(0<<<<<<<<<<<<<<<<<<< 12>使用这些其他选项对它们的解释方式与使用“默认”的方式有不同的影响@H_@R_301_449@_4@