int width = 100;
int height = 100;
int bytes_per_pix = 4;
Byte *rgbbuffer = malloc(width*height*bytes_per_pix);
for(int i=0;i<width*height*bytes_per_pix;i+=bytes_per_pix)
{
rgbbuffer[i+3] = 200;//这个是alfa值,因为是小字节序所以ARGB的内存储存方式为BGRA
rgbbuffer[i+1] = 100;
}
CGColorSpaceRef