ANYTOPNM(1)

πŸ“¦
version 11.13.03 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 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. πŸŽ€

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. 🧚
  • anytopnm does not recognize the options common to all programs based on libnetpbm (see Common Options). however, the -version option 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 🌈

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