Re: Embedding image data
Re: Embedding image data
- Subject: Re: Embedding image data
- From: Scott Thompson <email@hidden>
- Date: Sun, 12 Mar 2006 23:02:13 -0600
On Mar 12, 2006, at 12:54 PM, August Trometer wrote:
I've got a custom view class that uses a particular background
image. This image is static and won't change, even when used in
multiple applications. I'd like to make the class more portable,
and I don't want to have to copy the background image as well as
the source files. So, what I want to do is embed the image data in
the source file itself.
I'm guessing that I should do this as a static NSData object, then
use that data to create the image. However, I'm having trouble
figuring out the best way to represent the image data as well as
the coding the NSData object itself. Is there a good way to do this?
Sounds like an unusual thing to want to do. Even if you embed the
data directly into your source code, you're still going to be making
copies of the image every time you include that code in an
application. Why not just leave the image in the Resources fork of
your bundle and pull it from there?
Scott
_______________________________________________
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