Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > qdport -> NSImage

qdport -> NSImage
Thread Tools
Fresh-Faced Recruit
Join Date: Jan 2002
Location: chicago
Status: Offline
Reply With Quote
Sep 20, 2002, 10:39 PM
 
I'm trying to pull data out of a cocoa qdport and put it into an NSImage.

Long story short, I want to take live feed from a firewire camera and composite it with other alpha channeled forground/ background elements in realtime.

If anyone has done this before, has an idea, or suggestions, all are greatly appreciated.

thanks,
Shawn
     
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status: Offline
Reply With Quote
Sep 20, 2002, 11:34 PM
 
I've never done anything like this. However, I do have an idea/suggestion. I've heard that you CAN mix Cocoa and Carbon. QuickDraw is Carbon. Instead of trying to do this with NSImage, see if there is a way that you can do it in Carbon. If necessary, there are bound to be ways to move data between Carbon and Cocoa. I would check out [NSImage initWithData:] and [NSImage initWithPasteboard:] and see if there is a way you can feed Carbon data into it.

Can't help you on the Carbon side. Sorry. I'm still learning myself.

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Fresh-Faced Recruit
Join Date: Jan 2002
Location: chicago
Status: Offline
Reply With Quote
Sep 21, 2002, 09:19 AM
 
Yea I looked at [NSImages initWithData], I was hoping someone had already done it or had a minimal step solution for pulling the camera quicktime preview port into a NSImage. Apple has an SGDataProc for Cocoa that dumps the data into a QuickDrawView that is subclassed off of NSView. Problem being that only function available from this port is to grab a quickdraw port handle. So I surfed through the NSView class to see if I could find anything useful, but seen anything that jumped right out at me.

I guess I'll just give [NSImages initWithData] a whirl and see what happens.
thanks,
Shawn

Originally posted by Detrius:
I've never done anything like this. However, I do have an idea/suggestion. I've heard that you CAN mix Cocoa and Carbon. QuickDraw is Carbon. Instead of trying to do this with NSImage, see if there is a way that you can do it in Carbon. If necessary, there are bound to be ways to move data between Carbon and Cocoa. I would check out [NSImage initWithData:] and [NSImage initWithPasteboard:] and see if there is a way you can feed Carbon data into it.

Can't help you on the Carbon side. Sorry. I'm still learning myself.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:49 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2