Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-10-2008, 12:50 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,556
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default NSMutableArray of CGImageRef ?

Im using Quartz to draw some animations ( see problem in my other thread ), and I wanted to make an array of CGImageRef to store the images in, but I get an "passing argument 1 of 'addObject:' from incompatible pointer type.

Apparently it's not possible to do this, but I really don't want to have to keep an array of UIIMage* and have to use image.CGImage each time I want to draw those images.

Any ideas/suggestions?
smithdale87 is offline   Reply With Quote
Old 08-10-2008, 04:12 PM   #2 (permalink)
I live @ iDevKit.com
 
Join Date: Jul 2008
Posts: 142
Default

CGImageRef is just a pointer to a CGImage. before you put it in the array cast it to a CGImage.

Max
mxweas is offline   Reply With Quote
Old 08-10-2008, 05:31 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,556
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

Thanks.

On that note, is there any performance increase/decrease when using
UIImage's drawInRect method versus CGContextDrawImage?

More importantly, does it matter to mix them?
smithdale87 is offline   Reply With Quote
Old 08-10-2008, 06:19 PM   #4 (permalink)
I live @ iDevKit.com
 
Join Date: Jul 2008
Posts: 142
Default

I would assume UIImage just contains a CGImage so running core graphics methods cuts out the middle man being UIImage.

Max
mxweas is offline   Reply With Quote
Old 08-10-2008, 07:30 PM   #5 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,556
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

Thanks I'll give it a try.
smithdale87 is offline   Reply With Quote
Reply

Bookmarks

Tags
animation, drawing, graphics, quarts

Thread Tools
Display Modes

Posting 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



» Advertisements
» Online Users: 258
13 members and 245 guests
2WeeksToGo, AdamL, ADY, BrianSlick, Dani77, Dattee, headkaze, mer10, mgon987, timle8n1, Touchmint, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,879
Threads: 89,228
Posts: 380,745
Top Poster: BrianSlick (7,129)
Welcome to our newest member, mgon987
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:47 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0