PAMSPLIT(1)
π PAMSPLIT π
okay so quick vibe check: this is the Pamsplit User Manual (1), from the General Commands Manual section, and bestie it is SO good at what it does.
β¨ NAME β¨
pamsplit β split a multi-image Netpbm file into single-image files π¦
πΈ SYNOPSIS πΈ
pamsplit
[netpbmfile
[ output_file_pattern]]
[-padname=n]
okay real talk, you can use the minimum unique abbreviation of an option and it still works, slay. You can also use double hyphens instead of single hyphen to denote options, no cap. And you can put white space where the equals sign goes to separate an option name from its value. flexible queen behavior π
π DESCRIPTION π
So this program is part of Netpbm(1). π
pamsplit reads a PNM or PAM stream as input. Then it copies each image in the input into a separate file, in the same format. literally one image per file, so organized of it. β¨
npetbm β ok no, it's netpbmfile β that's the file name of the input file, or - to indicate Standard Input. The default is Standard Input. so if you say nothing, it's reading from stdin, as one does. π«Ά
output_file_pattern tells how to name the output files. It's the file name of the output file, EXCEPT that the first occurrence of "%d" in it gets replaced by the image sequence number in unpadded ASCII decimal, with the sequence starting at 0. okay and hear me out: if there is no "%d" in the pattern, pamsplit fails. it simply will not. so put the %d in there bestie. π
The default output file pattern is "image%d". iconic default, no notes. π
The -padname option specifies how many characters you want the image sequence number in the output file name padded with zeroes. pamsplit adds leading zeroes to the image sequence number as needed to get up to at least that number of characters. aaaand important detail: this is just the number of characters in the sequence number part of the name. for example,
pamsplit - outputfile%d.ppm -padname=3
would yield output filenames outputfile000.ppm, outputfile001.ppm, etc. so clean. so demure. π
Now listen, note this: to do the reverse operation (combining multiple single-image Netpbm files into a multi-image one), there is no special Netpbm program. Just use cat. that's it. that's the whole tip. cat said main character energy. π
If you just want to find out basic information about the images in a stream, you can use pamfile on the stream. πΈ
To extract images from a stream and generate a single stream containing them, use pampick. β¨
To run a program on each image in a stream without the hassle of temporary files, use pamexec. π¦
π OPTIONS π
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamsplit recognizes the following command line option:
-padname=nβ Specify the width (i.e. number of digits) of the image sequence number field in the filenames of the output files. The image sequence will be padded with leading zeroes to achieve the stated width.
The default is no padding (equivalent to -padname=0).
The -padname option was new in Netpbm 10.23 (July 2004). Before that, there was never any padding. so if you're time traveling, adjust accordingly. π°οΈ
π HISTORY π
pamsplit was new in Netpbm 9.5 (July 2000), as pnmsplit. In Netpbm 10.31 (December 2005), it gained the ability to split PAM files and was renamed. glow-up behavior, honestly. π
π«Ά SEE ALSO π«Ά
pamfile(1), pampick(1), pamexec(1), pnm(1), pam(1), cat man page
β 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/pamsplit.html
okay that's the whole page bestie, and one last thing β this was from the netpbm documentation, dated 11 August 2011, and it's the Pamsplit User Manual(1) π mwah, go split some streams, you're gonna ate π β¨π
π¦ where this page comes from
- 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