Pure Go implementation of imagefile.