Faster alternative to NSImage draw/composite?

2008-08-02 Thread Matt R
I have read through Apple's drawing optimization guide and have been searching for a way of speeding these operations up, they are unacceptably slow. I have several 72dpi PNG image files (about 1024x768 each) which I need to draw repeatedly into a standard NSView subclass over time. I would like

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread Charles Steinman
--- On Sat, 8/2/08, Matt R [EMAIL PROTECTED] wrote: I have read through Apple's drawing optimization guide and have been searching for a way of speeding these operations up, they are unacceptably slow. I have several 72dpi PNG image files (about 1024x768 each) which I need to draw

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread Joseph Heck
I've been doing exactly this recently, and have had excellent success with using CALayers (Core Animation). An NSTimer with a fast repeat rate is triggering a method that assigns in one of an array of CGImageRef's to the layer's contents property has made for a really decent flipbook style

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread Ken Ferry
Hi Matt, If you want to post a test app that shows your performance issue, that might help. However, no, going under NSImage doesn't make things faster unless there's are other issues. Certainly before trying OpenGL, try setting the setPreferredBackingLocation: for your NSWindow to be

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread John Harper
Hi, If you have a fixed set of images you're repeatedly flipping through you can have CoreAnimation do the animation for you, something like this: CAKeyframeAnimation *anim; NSMutableArray *images; CGImageRef im; int i; images = [NSMutableArray array];