I have written some code in a UIImage category that takes a UIImage (self) and then redraws it using CGContextRef. Is there any way to rewrite the UIImage (self) while using CGBitmapContext? Currently, I have it returning the image that was created through the CGContextRef, but is it possible to rewrite the image itself within that method?
Asked
Active
Viewed 488 times
2
-
good question. The same problem – Bartłomiej Semańczyk Jul 27 '15 at 08:26
1 Answers
5
From the UIImage
documentation:
Image objects are immutable, so you cannot change their properties after creation. ... Because image objects are immutable, they also do not provide direct access to their underlying image data.
It is therefore not possible to change the image data of an UIImage
after is has been created.

Martin R
- 529,903
- 94
- 1,240
- 1,382