Write out image information to file