Re: Blend mode 'darken' for NSImage?

2010-04-18 Thread Ken Ferry
On Sun, Apr 18, 2010 at 8:30 PM, Izak van Langevelde wrote: > > On 2010-04-18, at 11:00 PM, Ken Ferry wrote: > > > Ah, so your problem is that not every CG blend mode is available as an > NSCompositingOperation? If you would, please file a quick bug mentioning > that you needed this. > > > > From

Re: Blend mode 'darken' for NSImage?

2010-04-18 Thread Izak van Langevelde
On 2010-04-18, at 11:00 PM, Ken Ferry wrote: > Ah, so your problem is that not every CG blend mode is available as an > NSCompositingOperation? If you would, please file a quick bug mentioning that > you needed this. > From the documentation: "The compositing operations are related to (but d

Re: Blend mode 'darken' for NSImage?

2010-04-18 Thread Ken Ferry
Ah, so your problem is that not every CG blend mode is available as an NSCompositingOperation? If you would, please file a quick bug mentioning that you needed this. If you're running on 10.6, you can use -[NSImage CGImageForProposedRect:context:hints:] to get a CGImage, then draw the CGI

Blend mode 'darken' for NSImage?

2010-04-18 Thread Izak van Langevelde
I need to combine a number of NSImages such that each pixel of the result is the darkest of the corresponding pixels of the NSImages. Blend mode 'darken' does exactly what I need to, but I'm clueless about how to efficiently apply blend modes to NSImages. An alternative is to use an NSCompositing