Re: CIImage slower than NSImage?
Re: CIImage slower than NSImage?
- Subject: Re: CIImage slower than NSImage?
- From: Scott Thompson <email@hidden>
- Date: Tue, 29 Nov 2005 09:22:15 -0600
On Nov 22, 2005, at 09:00, Kenny Leung wrote:
Hi All.
I am using CoreImage in my application, and I'm finding that
geometric operations, particularly rotation, are much slower with
CIImage than NSImage. In fact, rotating an NSImage causes no
noticeable slowdown while rotating a CIImage causes a very
noticeable slowdown.
Also, applying a transform to a CIImage as a filter yields
different results than when the transform is applied to the current
graphics context.
Can someone shed some light on this?
Thanks!
-Kenny
When you simply rotate the context, the system just uses the same
representation of the image and performs sampling to create the
rotated image. Core Image goes through many more steps.
On Nov 22, 2005, at 11:54 AM, Kenny Leung wrote:
Also, the 128-bit floating point version of an image performs
better than the 32-bit integer version!
-Kenny
That doesn't surprise me much.
Core image processes it's image in a floating point space.
Conceptually, it takes the source pixels, color converts them to a
device independent RGB space that uses floating point pixels,
performs it's processing, and then "renders the results down" to the
destination.
Your performance observation is likely caused the need to convert 32
bit integers to a floating point representation. In other words, the
floating point version of the image requires less "mangling" than the
32 bit integer version.
Core image is remarkably fast at providing complex pixel processing.
For simpler things, however, the careful steps it goes through to
maintain the fidelity of the pixels it manages add too much
overhead. If you want to do something simple, like rotate an image,
consider using the framework images (CGImage and NSImage) or vImage
in the accelerate framework.
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden