I'm building a mobile advertising sdk for the iPhone and I assume that the only way to store the images that will represent the button icons for the landing page controller [in the library] is to convert the images into character arrays.
When I have the character array defined inline like:
const char backButtonData[] = { 0x00, 0x01, 0xFF, ... };
... I can access it like this:
UIImage *backButtonImage = [UIImage imageWithData:[NSData dataWithBytesNoCopy:backButtonData length:sizeof(backButtonData) freeWhenDone:NO]];
...and set up the controller's toolbar buttons with these icon images.
I've looked all over hoping to find a script to take image data and spit out a character array but came up empty handed so I've tried myself but have failed miserably.
What I need [hopefully] is a script or function to take the data from:
NSData *imageData = UIImagePNGRepresentation(image);
and spit it out into this format:
0x00, 0x01, 0xFF, ... so I can copy and past it into my source file.
Any ideas [or link to a script or tool that will do this] ?;