How to convert an image to Portable Pixel Map format: GIF: colour: giftopnm foo.gif > foo.ppm greyscale: giftopnm foo.gif > foo.pgm JPG: colour: jpgtopnm foo.jpg > foo.ppm greyscale: jpgtopnm foo.jpg > foo.pgm convert to greyscale by opening in gimp and saving as 'raw pgm' (you will be asked if you wish to export: answer 'yes') giftopnm and jpgtopnm are Linux utilities (in the default distribution). Challenge: Does anyone know of a less awkward way to translate greyscale JPG?