PAMSTRETCH(1)

πŸ’– pamstretch β€” the glow-up your pixels deserve πŸ’–

okay bestie, welcome to the Pamstretch User Manual (that's section 1 of the General Commands Manual, iykyk) ✨


🌸 NAME 🌸

pamstretch β€” scale up a PNM or PAM image by interpolating between pixels πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹


[-xscale=X]

[-yscale=Y] [-blackedge]

[-dropedge]

N

[infile]

okay so a few quality-of-life notes about how you're allowed to type this, because the CLI is lowkey chill like that:

  • You can use the minimum unique abbreviation of the options. Short king behavior, we respect it.
  • You can use two hyphens instead of one. --xscale? iconic. allowed.
  • You can separate an option name from its value with white space instead of an equals sign. no gatekeeping here.

🌈 DESCRIPTION 🌈

This program is part of Netpbm(1). 🫢

pamstretch scales up pictures by integer values β€” vertically, horizontally, or both. Literally just vibes but bigger.

So here's the tea on why it's different: pamstretch differs from pamscale and pamenlarge in that, when it inserts the additional rows and columns, instead of making the new row or column a copy of its neighbor, pamstretch makes the new row or column an interpolation between its neighbors. ✨ In some images, this produces better looking output. Periodt.

Want to scale up to non-integer pixel sizes, like e.g. 2.5? Not this girl's job, bestie β€” try pamstretch-gen(1) instead. 😌

Now, the options let you pick alternative methods of dealing with the right/bottom edges of the picture. Because the interpolation is done between the top-left corners of the scaled-up pixels, it's genuinely not obvious what to do with the right/bottom edges. The default behavior is to scale those up without interpolation β€” more precisely, the right edge is interpolated only vertically, and the bottom edge is interpolated only horizontally β€” but there are two other possibilities, selected by the -blackedge and -dropedge options. πŸ‘‘

And in the special case that the stretch factor is 1, there is no issue with the right and bottom edges β€” the edges of the output are identical to the edges of the input regardless of -blackedge and -dropedge. πŸ’– However, before Netpbm 10.86 (March 2019), -dropedge would cause the edge to be dropped even where the stretch factor was 1. Not me bringing up ancient drama but okay, the docs said it so I said it. πŸ’€


πŸŽ€ PARAMETERS πŸŽ€

  • N β€” this is the scale factor. It is valid only if you don't specify -xscale or -yscale. In that case, pamstretch scales in both dimensions and by the scale factor N. Two for one, we love a multitasker. ✨
🚨 history check: Before Netpbm 10.86 (March 2019), 1 was not a valid value.

✨ OPTIONS ✨

In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamstretch recognizes the following command line options:

  • -xscale=X β€” this is the horizontal scale factor. If you don't specify this, but do specify a vertical scale factor, the horizontal scale factor is 1. (mid, honestly, but okay.)

This option was new in Netpbm 9.21 (December 2001). throwback era πŸ“Ό

  • -yscale=Y β€” this is the vertical scale factor. If you don't specify this, but do specify a horizontal scale factor, the vertical scale factor is 1.

This option was new in Netpbm 9.21 (December 2001). matching set, slay πŸŽ€

  • -blackedge β€” interpolate to black at right/bottom edges. πŸ–€ dramatic, moody, mysterious.
  • -dropedge β€” drop one (source) pixel at right/bottom edges. This is arguably more logical than the default behavior, but it means producing output which is a slightly odd size. πŸ™ˆ it's giving "technically correct but at what cost"

πŸ’€ LIMITATIONS πŸ’€

Usually produces fairly ugly output for PBMs. For most PBM input you'll probably want to reduce the 'noise' first using something like pnmnlfilt(1). fr fr, clean your room before you redecorate 🧹✨


πŸ‘€ SEE ALSO πŸ‘€

pamstretch-gen(1), pamenlarge(1), pamscale(1), pnmnlfilt(1)

(the friend group πŸ’œ go check them out)


🫢 AUTHOR 🫢

Russell Marks (russell.marks@ntlworld.com).

thank you for your service king πŸ‘‘


πŸ“š 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/pamstretch.html

and that's the whole thing bestie, no cap πŸ’… netpbm documentation β€” 02 February 2019 🌈 stay stretched, stay iconic, mwah πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from