PGM (Portable Gray Map) and PBM (Portable Bit Map) files are very simple image file formats used for storing grayscale images. Useful when you need to store raw uncompressed values and want a format that's supported by a wide variety of image editors.
GraymapImage image;
if (!image.LoadImage("test_image.pgm")) {
std::cout << "Failed to load image!" << std::endl;
}
For more information, visit www.bertolami.com.