[Tutor] Anyone know of a window utility to reverse engineer unknown binary graphic file format?

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Sat Mar 5 23:31:50 CET 2005



On Sat, 5 Mar 2005, R. Alan Monroe wrote:

> I have some graphics files from an old DOS game that I want to convert
> to a normal .png or whatever. Anyone know of a program that can load
> binary data and view it multiple different ways? Like treating the raw
> data as 1 bit, 4 bit, 8 bit, planar, linear, adjust the pitch and
> offset, etc. in some kind of GUI until you get a recognizable image?


Hi Alan,

A lot of image types contain a recognizable header that you might be able
to use.  Python comes with a library that tries its best to recognize
certain image file types:

    http://www.python.org/doc/lib/module-imghdr.html

You may want to do a quick check with imghdr to see if it's something
standard that 'imghdr' can recognize.  Another possibility is to use the
'file' Unix utility, which also recognizes a surprising variety of file
formats.

Otherwise, I'm out of ideas at the moment.  *grin* You may want to ask
your question on comp.lang.python, since it is slightly unusual to get a
file and have to infer the file type.



More information about the Tutor mailing list