Most code that creates a bitmap context uses kCGImageAlphaPremultipliedFirst
, to create ARGB, instead of kCGImageAlphaPremultipliedLast
to create RGBA. Is there a reason ARGB is preferred?
(the usage):
CGBitmapContextCreate(NULL, size.width, size.height, 8, size.width * 4,
colorSpace, kCGImageAlphaPremultipliedFirst);