[SDL] Fast IMG Load

Gerry trick at icculus.org
Thu Jan 13 11:18:10 PST 2005


Benjamin Deutsch wrote:
> 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.

- Gerry




More information about the SDL mailing list