Acabei tendo que escrever um script Python personalizado que você pode encontrar aqui . Aqui está a parte importante.
#Load the raw file
f = open(filename,'rb') # switch to command line args later
#Because the byte order is weird
a = f.read(1)
b = f.read(1)
#First line is rows
rows = int((b+a).encode('hex'), 16)
a = f.read(1)
b = f.read(1)
#Second line is columns
cols = int((b+a).encode('hex'), 16)
#Last byte is encoding, but we're just going to ignore it
f.read(1)
#And everything else is 8 bit encoded, so let's load it into numpy and display it with matplotlib
bin_image = np.fromstring(f.read(), dtype=np.uint8)
#Change the shape of the array to the actual shape of the picture
bin_image.shape = (cols, rows)
fig = pylab.figure()
#Display the original image
fig.add_subplot(1,4,1)
pylab.imshow(bin_image, cmap=cm.gray)