• 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: convert GraphicsImportComponent to NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: convert GraphicsImportComponent to NSImage


  • Subject: Re: convert GraphicsImportComponent to NSImage
  • From: "Jonathan Johnson" <email@hidden>
  • Date: Fri, 21 Apr 2006 18:49:02 -0500

On 4/21/06, Michael Silva <email@hidden> wrote:
> Is there any reference to get an image stored as
> GraphicsImportComponent into a Cocoa NSImage object?  Does anyone
> have any suggestions?

As of QuickTime 6.5, you can use GraphicsImportCreateCGImage to get a
CGImageRef. Then, the only way I know to get this into an NSImage
would be to create a new NSBitmapImageRep, lock focus, draw the image
using CoreGraphics, and unlock focus.

A couple of conversions, but it's better than nothing, and doesn't
involve the disk.

Depending on your requirements, you might also consider using ImageIO
on 10.4 to skip the QT->CGImageRef step, and start with a CGImageRef.

HTH,
Jon


--
Jonathan Johnson
REAL Software, Inc.
 _______________________________________________
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: convert GraphicsImportComponent to NSImage
      • From: Michael Silva <email@hidden>
References: 
 >convert GraphicsImportComponent to NSImage (From: Michael Silva <email@hidden>)

  • Prev by Date: Re: convert GraphicsImportComponent to NSImage
  • Next by Date: Re: convert GraphicsImportComponent to NSImage
  • Previous by thread: Re: convert GraphicsImportComponent to NSImage
  • Next by thread: Re: convert GraphicsImportComponent to NSImage
  • Index(es):
    • Date
    • Thread