ANYTOPNM(1)
π NAME π
okay so bestie, meet anytopnm β she converts an arbitrary type of image file into PBM, PGM, or PPM. that's it, that's the whole job. slay β¨
this is a page from the Anytopnm User Manual, section 1 (general commands), and honestly? she's giving tiny-but-mighty. let's go π¦
πΈ SYNOPSIS πΈ
anytopnm [file]
that's literally it. one optional file. icon behavior tbh π
β¨ DESCRIPTION β¨
okay so first things first: this program is part of Netpbm(1). π«Ά
anytopnm converts the input image β which may be in any of like about 100 graphics formats, no cap β to PBM, PGM, or PPM format, depending on the nature of the input image. and then it outputs that to Standard Output. π«
so how does she even know what she's looking at?? detective era fr fr π 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 β and ngl it fails a lot, because very few image formats have magic numbers β anytopnm looks at the filename extension. and if that fails too? anytopnm punts. π yeah. she just gives up at that point.
the type of the output file depends on the input image. so like, the output picks itself based on what walked in the door. πͺβ¨
anytopnm uses the converters for particular graphics formats that are in the Netpbm package, so lowkey she can't convert any format that you couldn't convert with some other Netpbm program. what anytopnm adds is the ability to recognize the format and choose the appropriate Netpbm program to convert it. like, imagine you invoke anytopnm on a GIF file β anytopnm will recognize that it's a GIF file, and therefore giftopnm knows how to convert it to PNM, so anytopnm invokes giftopnm. chain reaction, main character energy, we love a delegator π
but also, real talk: anytopnm cannot recognize every possible input format. so you may still be able to convert an image with a specific Netpbm program even when anytopnm fails to convert it. she's not mad at you, she just wants you to know. π«Ά
now the glow-up details:
- if
fileindicates that the input file is compressed (either via Unixcompress,gzip, orbzipcompression),anytopnmuncompresses it and proceeds as above with the uncompressed result. π - if
fileindicates that the input file is encoded byuuencodeorbtoa,anytopnmdecodes it and proceeds as above with the decoded result. π - if
fileis-or not given,anytopnmtakes its input from Standard Input. π
and here's a little lore drop about multi-image files: many image formats are capable of representing multiple images. in most cases, anytopnm converts these to multi-image Netpbm images, but for some formats, anytopnm converts only the first image and ignores the rest. π
specifically in the case of a multi-image GIF input: anytopnm converts all the images starting with Netpbm 10.69 (December 2014), but only the first in earlier releases. glow-up timeline, periodt. β
π OPTIONS π
- there are no command line options defined specifically for
anytopnm. she's low maintenance, she's self-sufficient, she's thriving. π§ anytopnmdoes not recognize the options common to all programs based on libnetpbm (see Common Options). however, the-versionoption works. so that one? that one slays. π
ngl bestie, don't go throwing random libnetpbm flags at her. she will not know them. only -version is on the guest list. ποΈ
π SEE ALSO π
pamfile(1)pnm(1)fileman page
go read those too, they're the supporting cast and they ate. π
π AUTHOR π
Copyright (C) 1991 by Jef Poskanzer.
legend behavior, we stan. π
π DOCUMENT SOURCE π
this manual page was generated by the Netpbm tool makeman from HTML source. the master documentation is at:
http://netpbm.sourceforge.net/doc/anytopnm.html
and that's the whole vibe check, bestie π¦ this was netpbm documentation, dated 15 November 2014, from the Anytopnm User Manual(1). go convert something cute. mwah πβ¨π
π¦ where this page comes from
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms