A Google search for graphic image file format turned up a bunch of sites including http://www.dcs.ed.ac.uk/home/mxr/gfx/ which seems fairly comprehensive. If you can decipher the file header formats from these documents you should be able to read it in with perl using sysread (make sure you use binmode especially if you are not on *nix). You can then read the header using unpack (see Pack/Unpack Tutorial (aka How the System Stores Data) for some assistance there).
---
print map { my ($m)=1<<hex($_)&11?' ':'';
$m.=substr('AHJPacehklnorstu',hex($_),1) }
split //,'2fde0abe76c36c914586c';