[SDL] Fast IMG Load

Benjamin Deutsch ben at fictiongroup.de
Thu Jan 13 12:46:24 PST 2005


Hi again,

>>Sorry, actually I meant "has someone alreay written a program or script 
>>that does this, so I won't have to write one, or does gcc even come with 
>>a hidden flag for such purposes?"
> 
> Yes, I have: http://delirare.com/files/bin2c.c
> 
> The source is somewhat deranged, but hey. It's got an embedded makefile,
> so you can run "make -f bin2c.c" to make it. Run bin2c without any
> arguments for usage info.
> 
> The program can be used for any type of file, not just images, but it's
> probably a good idea to only use it for small-ish files. I've used it
> for icons and such.

Yes! Exactly what I what I was thinking of. Plenty of nice options, too. 
Now nothing can stop me from filling a CD with only the program binary 
itself!-D

Just two thoughts:

- Why not link it from your page? I checked, and you link to other 
"Stuff", but not to this. Shame, really.

- The usage of -d and -p should be documented a bit better. A single 
paragraph with an example would suffice. I'd offer to write it for you, 
but I'd just get it wrong !-)

Bye,
   Benjamin




More information about the SDL mailing list