UIImage -> CGImageRef

前端 未结 3 1284
有刺的猬
有刺的猬 2021-01-31 07:55

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.

3条回答
  •  忘了有多久
    2021-01-31 08:40

    write folowing to get CGImage from UIImage: Suppose u have an UIImage object ex imageObject then,

    CGImage imageRef = imageObject.CGImage
    

提交回复
热议问题