PNMTOPNM(1)

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

πŸ’– pnmtopnm β€” the manual, but make it make sense πŸ’–

okay so bestie, you're reading the Pnmtopnm User Manual, straight outta the General Commands Manual section, and I'm gonna walk you through it like we're texting at 2am πŸ¦‹


✨ NAME ✨

pnmtopnm β€” copy a PNM image. that's it. that's the whole job. queen of doing exactly one thing πŸ’…


🌸 SYNOPSIS 🌸

pnmtopnm

[pnmfile]

πŸŽ€ DESCRIPTION πŸŽ€

so this program is part of Netpbm(1), obviously, we stay in the family ✨

pnmtopnm literally just copies a PNM image to Standard Output. no glow-up, no remix. the output has the same major PNM format (PBM, PGM, or PPM) and the same maxval as the input. periodt.

now you might be like "bestie isn't that just cat??" 😭 and lowkey yes, BUT β€” and this is the iconic part β€” it lets you convert between the plain (ASCII) and raw (binary) subformats of PNM. that's the whole serve.

so remember this:

  • use the -plain Netpbm common option when you want the output to be plain PNM πŸ’–
  • don't use -plain when you want the output to be raw PNM 🫢

see Common Options for more on that.

ngl you don't normally need to convert between PNM subformats, because any program that uses the Netpbm library to read a PNM image will read all of them directly. that's the netpbm library being a generous king πŸ‘‘

BUT. there are a lot of programs out there that don't use the Netpbm library and only understand the raw format, so sometimes you gotta translate. and plain format is nice because it's human readable β€” people often use it to debug programs that process PNM images. it's giving "I read my own files" energy πŸ”

and here's the plot twist: pnmtopnm is really just another name for the program pamtopnm. fr fr. pamtopnm does the job because, like any Netpbm program that takes PAM input via the Netpbm programming library facilities, it also takes PNM input. it's giving "one icon, two names" 🌈


πŸ’… OPTIONS πŸ’…

so there are no command line options defined specifically for pnmtopnm, bestie. zero. none. 😌

but it does recognize the options common to all programs based on libnetpbm β€” see Common Options for the tea.


πŸ‘‘ HISTORY πŸ‘‘

okay history lesson, stay with me πŸ“š

pnmtopnm was new in Netpbm 10.23 (July 2004). it obsoleted pnmtoplainpnm, which specifically did the conversion to plain PNM. and there was no program to explicitly convert to raw PNM β€” but many Netpbm programs can be made, with the right options, to be idempotent (i.e. to do the same thing as pnmtopnm). slay.

then David Jones realized that the existing pamtopnm already did everything that pnmtopnm did and more, so in Netpbm 10.27 (March 2005), pnmtopnm became simply an alternate name for pamtopnm. iconic plot development 🎬


πŸ¦‹ SEE ALSO πŸ¦‹


🧚 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/pnmtopnm.html

and that's the whole page babes πŸ’– this was netpbm documentation, dated 24 March 2005, and you just read the Pnmtopnm User Manual β€” go convert something, you absolute main character πŸŽ€βœ¨

πŸ“¦ where this page comes from