• 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
Re: Drawing an NSImage into a GWorld
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing an NSImage into a GWorld


  • Subject: Re: Drawing an NSImage into a GWorld
  • From: Dave Hersey <email@hidden>
  • Date: Tue, 12 Jul 2005 13:38:40 -0400

Check out the CocoaCreateMovie sample for one approach.

Specifically in:

http://developer.apple.com/samplecode/CocoaCreateMovie/listing3.html

Find CopyNSImageToGWorld at the bottom.

This code will replace the existing bitmap data in the GWorld, not merge
pixels. It doesn't sound like that matters in your case. If it does, you
could handle that several ways.

- Dave

On 7/12/05 11:04 AM, "Darrin Cardani" <email@hidden> wrote:

> I'm working on an iMovie plugin. In iMovie, you have to return the
> final rendered frame as a GWorld. However, I have an NSImage (which
> is known to have an NSBitmapImageRep) that I need to draw into that
> GWorld. What's the easiest way to do that?
>
> I realize I could convert the NSImage into a CGImageRef and wrap a
> CGBitmapContext around the GWorld, then draw the CGImageRef into
> that, but that seems rather roundabout.
>
> I could also get the bitmap representation's raw pixel data into
> another GWorld and use CopyBits to get it into the final (differently
> sized) GWorld. But I'm wondering if there's a recommended way to do
> it?
>
> Thanks,
> Darrin

 _______________________________________________
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

  • Follow-Ups:
    • Re: Drawing an NSImage into a GWorld
      • From: Scott Thompson <email@hidden>
References: 
 >Drawing an NSImage into a GWorld (From: Darrin Cardani <email@hidden>)

  • Prev by Date: Re: Finding out mouse button state outside of event stream
  • Next by Date: Re: Finding out mouse button state outside of event stream
  • Previous by thread: Drawing an NSImage into a GWorld
  • Next by thread: Re: Drawing an NSImage into a GWorld
  • Index(es):
    • Date
    • Thread