All solutions I've found for doing this (like this one Change color of certain pixels in a UIImage ) suggest to create a new uiimage, but I want to modify directly a pixel in the uiimage without creating a new one. Is there a way to do this ? It seems that cgimage is not mutable, but is there a way to create an image from a pixel data buffer, and modifying this pixel data buffer would directly modify the image ?
Asked
Active
Viewed 50 times
0
-
Can you describe in more detail what you're trying to accomplish. That may help readers in coming up with solutions to your problem. Also, how large are your images going to be in general? – user1118321 Nov 17 '18 at 17:17
-
3You can't. **Image objects are immutable, you cannot change their properties after creation.** https://developer.apple.com/documentation/uikit/uiimage – Leo Dabus Nov 17 '18 at 17:40
-
https://developer.apple.com/documentation/uikit/uigraphicsimagerenderer – Leo Dabus Nov 17 '18 at 19:34