Re: Writing NSImage

2017-06-21 Thread Graham Cox
Drop down one level - create a bitmap image rep of the type you want, make a context for it, draw the image into that, then (if necessary) add it to a NSImage with addRepresentation: Working at this level you have total control, and rarely need an NSImage at all. —Graham > On 21 Jun 2017,

Writing NSImage

2017-06-21 Thread Gerriet M. Denkmann
macOS 12.5 I create an image like: NSImage *subImage = [ [NSImage alloc] initWithSize: subRect.size ]; [ subImage lockFocus ]; [ self.imagedrawAtPoint:NSMakePoint(0, 0) fromRect: subRect operation: