Algorithm in C# to read images in the Netpbm format (PPM, PGM, PBM and PNM).