PBMTOPGM(1)

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

πŸ’« pbmtopgm β€” the manual, but make it make sense πŸ’«

okay bestie, so this is pbmtopgm from the Netpbm manual (that's the manual name, in case you were wondering β€” Netpbm does so much and this is one lil guy in the family 🫢).


✨ NAME ✨

pbmtopgm β€” convert PBM image to PGM by averaging areas πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

pbmtopgm width height [pbmfile]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first things first, this program is part of Netpbm(1). it's giving team player. 🌈

pbmtopgm reads a PBM image as input. then it outputs a PGM image, and in that output, each pixel's gray level is the average of the surrounding black and white input pixels. the "surrounding area" is a rectangle of width by height pixels β€” so like, the box you asked for, periodt.

in other words? it's a convolution. no cap. pbmtopgm is basically a special case of pnmconvol. they're cousins fr fr.

you may need a pnmsmooth step after pbmtopgm. like, a lil follow-up skincare routine. ✨

pbmtopgm has the effect of anti-aliasing bitmaps which contain distinct line features. those jagged edges? smoothed. iconic.

pbmtopgm works best with odd sample width and heights. odd numbers, bestie. remember that. πŸ‘‘

and here's the tea 🍡 β€” you don't actually need pbmtopgm just to use a PGM program on a PBM image. any PGM program (assuming it uses the Netpbm libraries to read the PGM input) takes PBM input as if it were PGM, with only the minimum and maximum gray levels. so unless your convolution rectangle is bigger than one pixel, you're not gaining anything with a pbmtopgm step. literally nothing. save yourself the extra command. πŸ’€

the opposite transformation (which would turn a PGM into a PBM) is dithering. see pamditherbw.


πŸ’… OPTIONS πŸ’…

there are no command line options defined specifically for pbmtopgm, bestie. none. zero. but it does recognize the options common to all programs based on libnetpbm (see Common Options). so it's not completely optionless, it's just running on shared family energy. 🫢


🌸 SEE ALSO 🌸


πŸ‘‘ AUTHOR πŸ‘‘

Copyright (C) 1990 by Angus Duggan.

Copyright (C) 1989 by Jef Poskanzer.

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.

that's the legal bit, and yes it matters β€” don't skip it, it's not just vibes. πŸ™ˆ

🧚 DOCUMENT SOURCE 🧚

this manual page was generated by the Netpbm tool makeman from HTML source. the master documentation lives at

http://netpbm.sourceforge.net/doc/pbmtopgm.html

and that's a wrap, bestie πŸŽ€ this lil manual page is brought to you by netpbm documentation, dated 05 Feb 2003. yes, 2003. vintage. ate. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from