PAMRESTACK(1)
π 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 β¨
pamrestackcan rearrange into rectangles single-dimension images produced by programs such asppmhistandpamseq. This makes the output easier to examine with a viewer. Conversely,pamrestackcan 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 πpamrestackcan 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 πpamrestackcan be used withpamdice,pamundice,pamcat, etc. to divide and combine images in the process of interlacing. squad goals πΈ
π EXAMPLES π
- Rearrange the one-dimensional output of
pamseqinto 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
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms