I made a little python tool and wanted to share it. It's a neat little tool to visualize binary data in a graphical form. It's really interesting to look at different types of files.
#"Copyright 2009 Bryan Harris"
#This file is part of bin2bmp.py.
# bin2bmp.py is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# bin2bmp.py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with bin2bmp.py; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
print "usage:", sys.argv, "filename width"
print "The second argument, "+sys.argv+", does not appear to be an integer!"
tmpfile = sys.argv
filename = os.path.split(sys.argv)
fileobj = open(tmpfile, mode='rb')
print "Can't open "+sys.argv+" for some reason."
im = Image.new("RGB",(width,int(chunks/width)+1),black)
for i in range(chunks):
#if i<20:print RGB