ImageProcessing for PGM