Fix warning. Cast the bitmapInfo parameter for CGBitmapContextCreate. This is safe to do - from docs "The constants for specifying the alpha channel information are declared with the CGImageAlphaInfo type but can be passed to this parameter safely.