Re: Embedding image data
Re: Embedding image data
- Subject: Re: Embedding image data
- From: Eric Long <email@hidden>
- Date: Mon, 13 Mar 2006 08:00:09 -0800
- Thread-topic: Embedding image data
> If you are determined, however, you could do something like use
> hexdump to dump the image data in hexadecimal form. Format the
> hexadecimal so that you can include it in a char * array. Also write
> the length of the data into a variable. Then, at runtime, you simply
> build your CFData from the char * array and import the image from there.
Actually, for a static array you can just do something like this:
const char myArray[] = 0xFF, etc.
length = sizeof(myArray)
This will not work for a dynamically allocated array, since you'd just get
the size of the ptr.
Eric
_______________________________________________
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