topframe

bin2h


bin2h is a tool to allow embedding of binary files in programs. It makes a binary file into a c header file, which can easily be included in different projects.

Usage: bin2h [/O name] [/S] [/U] [/V name] <filename>
  /O name - Name of the output file
  /S - Don't include size variable
  /U - Use Unix-style line endings
  /V name - Name of the variable

Here is a batch file example if you want to put multiple files in one .h file.

DEL ..srcimages.h
FOR %%X IN (*.tga) DO bin2h %%X
FOR %%X IN (*.h) DO type %%X >> ..srcimages.h
DEL *.h

Last updated 2012-01-24 - no longer requires cygwin1.dll

Downloadbin2h 1.01 (58k)
DownloadSourcecode (6k)

Back to Command Line tools
bottomframe