PAMRESTACK(1)

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

πŸ’– PAMRESTACK πŸ’–

okay bestie, welcome to the Pamrestack User Manual, straight out of the General Commands Manual section, and it's giving main character energy fr fr πŸŽ€


✨ NAME ✨

pamrestack β€” rearrange rows of a Netpbm image πŸ¦‹


🌸 SYNOPSIS 🌸

pamrestack

[-width=width]

[-trim={fill|crop|abort}]

[-verbose]

[pamfile]

okay so quick notes on the vibe here: minimum unique abbreviations of any option are totally acceptable πŸ’…. You can also use double hyphens instead of a single hyphen to denote options (so --width hits the same as -width, no cap). And you can use white space in place of the equals sign to separate an option name from its value β€” the computer does not care, live your truth ✨


πŸ‘‘ DESCRIPTION πŸ‘‘

This program is part of Netpbm(1). πŸ’–

pamrestack rearranges the pixels of a Netpbm image into different size rows. Like, say an image is 100 pixels wide and 50 pixels high β€” you can rearrange it to 125 wide and 40 high. In that case, 25 pixels from the start of the 2nd row of the input would be moved to the end of the 1st row of input, 50 pixels from the 3rd row would be moved to the 2nd row, etc. it's literally just shuffling pixels around until the rows are a different shape 🫢

Put another way, pamrestack arranges all the input rows into one long sequence and produces output rows therefrom, in FIFO order. iconic behavior honestly.

Input is from Standard Input if you don't specify the input file pamfile.

Output is to Standard Output.

pamrestack works on a multi-image stream. It cuts each image in the stream independently and produces a multi-image stream output. not it handling a whole stream like it's nothing πŸ˜­πŸ’…


πŸ’… OPTIONS πŸ’…

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

  • -width=width β€” the width of the output. If this option is not specified, the output will consist of a single row wide enough to contain all the pixels of the input image. yes bestie, one (1) giant row 🌈
  • -trim={fill|crop|abort} β€” this option specifies what to do when the new width does not cleanly divide the number of pixels in the input image. the three moods are:
    • fill β€” (Default) complete the final row by adding black pixels as necessary. filling in the gaps, we love a supportive queen πŸ–€
    • crop β€” discard the final partial row. If this means there is nothing to output, fail the program.
    • abort β€” fail the program. just straight up no πŸ’€
  • -verbose β€” print information about the processing to Standard Error.

πŸ¦‹ USAGE πŸ¦‹

pamrestack is a general editor with many possible uses. she contains multitudes ✨

  • pamrestack can rearrange into rectangles single-dimension images produced by programs such as ppmhist and pamseq. This makes the output easier to examine with a viewer. Conversely, pamrestack can be used to convert a normal rectangular image into one wide row or one tall column if that is desirable for compression, conversion, or analysis. glow up either direction, honestly πŸŽ€
  • pamrestack can repair images corrupted by an incorrect width value in the header. Images grabbed from the framebuffer device often exhibit this problem. she's a healer fr fr πŸ’–
  • pamrestack can be used with pamdice, pamundice, pamcat, etc. to divide and combine images in the process of interlacing. squad goals 🌸

🌈 EXAMPLES 🌈

  • Rearrange the one-dimensional output of pamseq into a square:
pamseq 3 255 | pamrestack -width=4096
  • Combine two files, each 600 pixels wide, one with the odd rows and another with the even rows, to construct an interlaced image:
pamcat -leftright oddrows.ppm evenrows.ppm | pamrestack -width=600
  • Like the above, but invert all pixels in the even rows left to right to produce a serpentine interlace:
pamflip -leftright evenrows.ppm |
  pamcat -leftright oddrows.ppm - |
    pamrestack -width 600

serpentine interlace?? we love a plot twist 🐍✨


πŸ’œ SEE ALSO πŸ’œ

pamseq(1), ppmhist(1), pnmshear(1), pamscale(1), pamdeinterlace(1), pamdice(1), pamundice(1), pamcat(1), pam(1)

go read the whole friend group, iykyk 🫢


πŸ“œ HISTORY πŸ“œ

pamrestack was new in Netpbm 10.99 (June 2022). a 2022 baby, she's young and thriving πŸ’…


πŸŽ€ AUTHOR πŸŽ€

By Akira F. Urushibata. Contributed to the public domain by the author. king 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/pamrestack.html

and that's the whole thing bestie! πŸ’– this lil page came to you straight from netpbm documentation, filed under Pamrestack User Manual(1) β€” the <kbd>Updated:</kbd> field was living its blank-slate era, so no date to report, periodt. now go stack some rows, you got this βœ¨πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from