Use better functions in iOS to get a CGImage.