Can I edit the pixels of the UIImage's property CGImage

前端 未结 7 1473
野趣味
野趣味 2020-11-28 05:04

UIImage has a read-only property CGImage. I have to read its pixels to a memory block and edit them and then make a new UIImage to replace the old one. I want to know if th

7条回答
  •  天命终不由人
    2020-11-28 05:24

    This may help you out.

    When you're done, you can use CGImageCreate to create a CGImageRef, then use +[UIImage imageWithCGImage:] to create a new UIImage.

提交回复
热议问题