Problem And Question
How can I save a NSImage as a new file (png, jpg, …) in a certain directory?
Thank you for answering my “noobish” question.
Best Solution And Answer
Do something like this:
NSBitmapImageRep *imgRep = [[image representations] objectAtIndex: 0]; NSData *data = [imgRep representationUsingType: NSPNGFileType properties: nil]; [data writeToFile: @"/path/to/file.png" atomically: NO];