I am wondering how to combine drawn pixels in a UIView with the image in a UIImageView and save it as a new image? I have no clue how to go about this.
If anyone could point me in the right direction, I would love it.
Thank you!
I am wondering how to combine drawn pixels in a UIView with the image in a UIImageView and save it as a new image? I have no clue how to go about this.
If anyone could point me in the right direction, I would love it.
Thank you!
Check out Quartz 2D. Specifically, CGContextDrawImage()
can be used to load an image, draw whatever you want on this context, and then you can CGBitmapContextCreateImage()
to create a CGImageRef
from which you can create an image with UIImage
's imageWithCGImage
. Finally, you use UIImagePngRepresentation()
or UIImageJPEGRepresentation()
to get a NSData that you can then use writeToFile
with.