Linux Commands Examples

A great documentation place for Linux commands


attempt to convert an unknown type of image file to a portable anymap

see also : pnmfile - file


anytopnm [file]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


anytopnm $1 > tmp.pnm
pnmtops tmp.pnm $1.eps


anytopnm converts the input image, which may be in any of dozens of graphics formats, to PBM, PGM, or PPM format, depending on that nature of the input image, and outputs it to Standard Output.

To determine the format of the input, anytopnm uses the file program (possibly assisted by the magic numbers file fragment included with Netpbm). If that fails (very few image formats have magic numbers), anytopnm looks at the filename extension. If that fails, anytopnm punts.

The type of the output file depends on the input image.

If file indicates that the input file is compressed (either via Unix compress, gzip, or bzip compression), anytopnm uncompresses it and proceeds as above with the uncompressed result.

If file indicates that the input file is encoded by uuencode or btoa, anytopnm decodes it and proceeds as above with the decoded result.

If file is - or not given, anytopnm takes its input from Standard Input.

see also

pnmfile , pnm, file


Copyright (C) 1991 by Jef Poskanzer.

How can this site be more helpful to YOU ?

give  feedback