Question: how to open pgm file?
Answer: Viewing PGM files The simplest way to view a PGM image file is to download the free image viewer Irfanview from http://www.irfanview.com/. By default, the viewer will attempt to “smooth out” the pixels when rendering the image, so to see the individual pixels more clearly, go to Edit --> Show Paint dialog.