See http://stackoverflow.com/questions/5679834/convert-binary-data-into-hex-string-for-c-program Customize $filenames and $writer_format in file2array.rb, then run: ruby file2array.rb On Mac, you can use xxd: xxd -i foo.png
ngocdaothanh/file2array
Ruby version of http://stackoverflow.com/questions/5679834/convert-binary-data-into-hex-string-for-c-program
Ruby