Haskell implementation of the 'imagefile' format