UIImage -> CGImageRef
-
06-09-2020 - |
Question
I'm building an Iphone app that needs to convert a UIImage to a CGImageRef. I have no idea how to do this and would love some help. I have no background in working with images... :)
Solution
It is as simple as image.CGImage
where image
is a UIImage
object.
OTHER TIPS
CGImageRef cgImage = [someImage CGImage];
write folowing to get CGImage from UIImage: Suppose u have an UIImage object ex imageObject then,
CGImage imageRef = imageObject.CGImage
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow