The kCGImageAlpha*
enum values are supposed to fill the first five bits in CGBitmapInfo
. However, since the C type system can't express this, you get a warning that the types don't match, even though they were intended to.
The correct solution is to cast your alpha enum value to CGBitmapInfo
, since that's what it is:
(CGBitmapInfo)kCGImageAlphaPremultipliedFirst