changing the intermediate file to PNG instead of PGM