On Thu, Apr 3, 2008 at 8:23 PM, David Duncan <[EMAIL PROTECTED]> wrote: > On Apr 3, 2008, at 11:34 AM, Jonathan del Strother wrote: > > > > CALayer says that 'contents' is "typically a CGImageRef, but may be > > something else". I (optimistically) tried assigning the > > CVPixelBufferRef directly to the contents, but apparently that's not > > included in the mysterious 'something else' list. > > > > Could you point out where it says that?
It's in CALayer.h, just above the 'contents' method declaration. > > The only way I've found of going from CVPixelBufferRef to CGImageRef > > is via CIImage, something like the following : > > > > > If you have a CVPixelBufferRef, you can use the various functions defined > for a CVPixelBuffer to access the base address, row bytes, width, height and > other attributes to create a CGImageRef directly from it via > CGImageCreate(). Even for yuv? I thought CGImageCreate only handled variations on rgba, but will give it another go... _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
