• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Embedding image data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Embedding image data
      • From: glenn andreas <email@hidden>
References: 
 >Re: Embedding image data (From: Scott Thompson <email@hidden>)

  • Prev by Date: How to get NSPopUpButtonCell as an NSTextAttachment sending self instead of nil when it performs it's attached target/action
  • Next by Date: Re: NSUserDefaults and objects
  • Previous by thread: Re: Embedding image data
  • Next by thread: Re: Embedding image data
  • Index(es):
    • Date
    • Thread