The docs clearly state you can use values from the CGImageAlphaInfo
even though the parameter is defined as needed a value from the CGBitmapInfo
enum.
One solution would be to cast the value:
(CGBitmapInfo)kCGImageAlphaOnly
That will make the compiler happy.