Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

toddburch

macrumors 6502a
Original poster
Dec 4, 2006
748
0
Katy, Texas
I don't have Photoshop. I'm writing the (probably infamous) Moon Travel Planner application from "Learning Carbon". Surprisingly, most of the Project Builder info in the book still applies to Xcode, so, so far, so good.

However, it calls for a .rsrc graphic of an image. The books web site provides all the resources needed for examples in a downloadable .sit file, but I'd rather not download stuffit to expand it.

Is there any way, with the native apps on Tiger to create a .rsrc file from a .png or .jpg?

Thanks, Todd
 
How are you using your image? Resources files shouldn't be used anymore. They are from the classic days. CoreGraphics has lots of functions for dealing with images with Carbon directly.
 
Well, I'm just following the book - happily and blindly using the Project Builder instructions with Xcode!

So, perhaps my question ought to be - how do I incorporate a .png file into a PICT area in a Carbon App that uses a nib in Xcode?

(Say that 3 times real fast).
 
Do bear in mind that Carbon is on the way out - it was a transitional API between the classic OS and OS X, but is being phased out now. Expect it to be completely deprecated in the not-too-distant future.

I'd suggest you start looking at cocoa - it's the future (and won't lead you down dead ends like .rsrc files).
 
Do bear in mind that Carbon is on the way out - it was a transitional API between the classic OS and OS X, but is being phased out now. Expect it to be completely deprecated in the not-too-distant future.

I'd suggest you start looking at cocoa - it's the future (and won't lead you down dead ends like .rsrc files).

Yes he knows :)
 
OK, thanks kainjow. You da man. I'm reading...

Yes, I know Carbon is the lame duck. Any principles I learn I'm sure will apply to Cocoa.

Thanks!

Todd
 
Just download StuffIt Expander. It's available as a UB, and for Windows if you are on that by any chance...
 
I tried twice earlier today. Both times, the registration dialog (that you have to fill out to get a link for the download) crashed Safari, and in doing so, screwed up all my settings, big time.

I'll try with Firefox.
 
I have a question about the moon.rsrc file. When I added it to IB, in the Images tab, it shows up as 3 entities:

  • ICNS: 16455
  • PICT: 32236
  • PICT: 8722

I suspect the first one is an ICON, as it is smaller. The other two are similar in size. What's the trailing number? The size in bytes?

Todd
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.