27 August 2018

Converting pgm files to jpg or png

Some software do not recognize the pgm image file format, even though it was created in the 1980's.

Luckily, Ubuntu has a pre-installed software named Imagemagick with which you can use this command to batch-convert all pgm files to png or jpg.

mogrify -format png *.pgm
or
mogrify -format jpg *.pgm

Try using it to convert from other formats too.

No comments: