spit to file, and pgm -> ppm