• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
drawing onto CVPixelBuffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

drawing onto CVPixelBuffer


  • Subject: drawing onto CVPixelBuffer
  • From: eveningnick eveningnick <email@hidden>
  • Date: Fri, 06 May 2011 23:22:09 +0300

Hi
I have a CVPixelBuffer with some background picture.
I need to draw on this background some foreground image. I don't need
to preserve the initial CVPixelBuffer's content - i just need to add a
small foreground watermark onto that buffer.

CIImage does allow to create an image from CVPixelBuffer and paint
something on top of it (using Core Image filters), but CIImage is
"read only" - it takes a source image and generates a brand new image
in a new buffer.
I can't afford one more copying, that greatly slows things down,
because the CVPixelBuffer itself is kind of big. And there are a lot
of them per second (they are generated as frames from a movie).

Is there any way i could draw without such a copy? Maybe there is any
other imaging framework that allows me to work with CVPixelBufferRef?
Or should i just 'CVPixelBufferLock' the buffer, and copy raw bytes
onto the buffer from my source NSImage (that contains the foreground
image) directly using a loop? This doesn't seem the right way though.
Could you please help me, what is better to do here?

Thanks
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: drawing onto CVPixelBuffer
      • From: eveningnick eveningnick <email@hidden>
    • Re: drawing onto CVPixelBuffer
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: Threading synchronization: does a primitive exists?
  • Next by Date: Re: Threading synchronization: does a primitive exists?
  • Previous by thread: Re: NSOperationQueue and Synchronization Control
  • Next by thread: Re: drawing onto CVPixelBuffer
  • Index(es):
    • Date
    • Thread