mksprite makes pretty optimal sprite files from draw and Euclid files. It is designed to be easy to use in a makefile.