How can I draw to an image in objective-c? all I need to do is create an image with a size I set, draw few AA lines and save the image to a png file. I tried to find it in apple docs but there are CGImage, NSImage, CIImage and more. which one is easiest for my goal? I only need to support the latest mac os x version so new things are not a problem.
How can I draw to an image in objective-c? all I need to do
Share
Probably the easiest way is to use an
NSImageand draw directly into it after callinglockFocus.Example: