Convert JPG to PGM 

Only in python2.7