removing image. .pgm does not work?