How can I create a blank png UIImage in Objective C programmatically (let's say 36x36 px)?
Thanks :)
You can open an image context, and then harvest its content immediately, without drawing anything into it. This should produce a blank 36x36
UIImage
:
UIGraphicsBeginImageContextWithOptions(CGSizeMake(36, 36), NO, 0.0); UIImage *blank = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With