(pgmWrite (ppm->pgm (ppmRead "img.ppm")) "img.pgm")