FROM : David Duncan
DATE : Thu Apr 03 21:23:59 2008
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? Typically you would set the
contents property either as a CGImageRef, or as the value of the
contents of another layer (which would cause them to share contents).
> 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(). You should be able to find more
information by consulting the CoreVideo and Quartz references.
--
David Duncan
Apple DTS Animation and Printing
david.<email_removed>
DATE : Thu Apr 03 21:23:59 2008
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? Typically you would set the
contents property either as a CGImageRef, or as the value of the
contents of another layer (which would cause them to share contents).
> 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(). You should be able to find more
information by consulting the CoreVideo and Quartz references.
--
David Duncan
Apple DTS Animation and Printing
david.<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Jonathan del Strot… | Apr 3, 20:34 | |
| David Duncan | Apr 3, 21:23 | |
| Jonathan del Strot… | Apr 3, 21:28 | |
| David Duncan | Apr 3, 21:38 | |
| Jonathan del Strot… | Apr 3, 22:00 | |
| David Duncan | Apr 3, 22:11 |






Cocoa mail archive

