PNMTOFIASCO(1)

πŸ’– pnmtofiasco β€” the Pnmtofiasco User Manual (1), General Commands Manual πŸ’–

okay bestie, sit down, hydrate, because we're about to turn your pictures into fractal-coded excellence ✨


🌸 NAME 🌸

pnmtofiasco β€” convert a PNM file into a FIASCO compressed file. that's it, that's the whole job, and it ate πŸ’…


✨ SYNOPSIS ✨

pnmtofiasco [option]...  [filename]...

πŸ¦‹ DESCRIPTION πŸ¦‹

This program is part of Netpbm(1), so you already know it's in good company 🫢

pnmtofiasco compresses the named pbm, pgm, or ppm image files β€” or, if you don't name any files, it reads from Standard Input β€” and it produces a FIASCO file on Standard Output. main character energy, honestly πŸ‘‘


πŸ’… OPTIONS πŸ’…

So besides the options that every libnetpbm-based program gets (most famously -quiet, peep Common Options for that), pnmtofiasco also recognizes all of this goodness below πŸ‘‡

Fun fact, no cap: all option names can be abbreviated! Like --optimize can be written as --optim or even --opt. So chill. And for most options there's a one-letter short version too. Whatever arg is mandatory or optional for the long option is mandatory or optional for the short one as well. Oh and β€” heads up β€” both short and long options are case sensitive, so -V is not -v, bestie, they are NOT the same girl πŸ™ˆ

πŸŽ€ Basic Options πŸŽ€

  • --image-name=name, -i name β€” compress the images you name instead of Standard Input. If name is -, you read Standard Input. name has to be either an image filename or a template that looks like this:
prefix[start-end{+,-}step]suffix

Templates are the moment when you're compressing video streams, fr fr β€” like if you pass the template img0[12-01-2].pgm, then pnmtofiasco compresses img012.pgm, img010.pgm, ..., all the way down to img002.pgm. iconic.

If name is a relative path, pnmtofiasco goes looking for the image files in the current directory and in the (colon-separated) list of directories given by the environment variable FIASCO_IMAGES.

  • --output-name=name, -o output-file β€” write the FIASCO output to the named file instead of Standard Output.

If name is a relative path and the environment variable FIASCO_DATA is a (colon-separated) list of directories, then pnmtofiasco writes the output file into the first writable directory of that list. Otherwise it just plops it in the current directory. flexible queen πŸ’œ

  • --quality=N, -q N β€” set the quality of compression to N. Quality runs from 1 (worst) to 100 (best), and the default is 20.
  • --version, -v β€” print the pnmtofiasco version number, then dip out. bye ✌️
  • --verbose N, -V N β€” set the level of verbosity to N. The level is 0 (no output at all), 1 (show progress meter), or 2 (show detailed compression statistics). Default is 1.
  • --progress-meter N, -B N β€” set the type of progress meter to N. Here are your options, and the default is 1:
    • 0 β€” no progress meter
    • 1 β€” RPM style progress bar using 50 hash marks
    • 2 β€” percentage meter
  • --config=name, -f name β€” load the parameter file name to initialize the options of pnmtofiasco. Peep file system.fiascorc for an example of the syntax. Your options get set by any of these methods, and the order matters (in the specified order):
  1. Global resource file /etc/system.fiascorc
  2. $HOME/.fiascorc
  3. command line
  4. --config=name
  • --info, -h β€” print brief help, then exit.
  • --help, -H β€” print detailed help, then exit. (yes, capital H is the detailed one, lowercase h is the brief one, don't mix them up babe πŸ“)

πŸ”₯ Options for Advanced Users πŸ”₯

  • --basis-name=name, -b name β€” preload the compression basis name into FIASCO. The basis name provides the initial compression dictionary. Either use one of the files "small.fco", "medium.fco", or "large.fco" that come with pnmtofiasco, or go off and create a new ASCII basis file yourself. artiste behavior πŸ’…
  • --optimize=N, -z N β€” set the optimization level to N. Level is 0 (fastest) to 3 (slowest).
⚠️ Be warned, bestie: the encoding time dramatically increases when N=2 or N=3, while the compression performance only improves slightly. it's giving diminishing returns, lowkey.

The default is 0.

  • --prediction, -P β€” use additional predictive coding. If this optimization is enabled, the image gets compressed in two steps. In the first step, a coarse approximation of the image is computed using large unichrome blocks. Finally, the delta image is computed and the prediction error is approximated using the standard FIASCO algorithm. two-step slay ✨
  • --dictionary-size=N, -D N β€” set the size of the dictionary that's used when coding the luminance band to N. Default is 10000, i.e., the dictionary is not restricted.
  • --chroma-dictionary=N, -C N β€” set the size of the dictionary that's used when coding chroma bands to N. Default is 40.
  • --chroma-qfactor=N, -Q N β€” reduce the quality of chroma band compression N-times relative to the user defined quality q of the luminance band compression (--quality=q). Default is 2.
  • --tiling-exponent=N, -t N β€” subdivide the image into 2^N tiles prior coding. Default is 4, i.e. the image is subdivided into 16 tiles. The processing order of the individual tiles is defined by the option below πŸ‘‡
  • --tiling-method=name, -T name β€” order the individual image tiles (the image is subdivided, remember β€” see option --tiling-exponent=N) by method name. Default is desc-variance. Your choices, babes:
    • desc-variance β€” tiles with small variances are processed first.
    • asc-variance β€” tiles with large variances are processed first.
    • desc-spiral β€” tiles are processed in spiral order starting in the middle.
    • asc-spiral β€” tiles are processed in spiral order starting at the border.
  • --rpf-mantissa=N β€” use N mantissa bits for quantized coefficients.
  • --dc-rpf-mantissa=N β€” use N mantissa bits for quantized DC coefficients.
  • --rpf-range=N β€” coefficients outside the quantization interval [-N,+N] are set to zero. zero'ed, gone, not invited 🚫
  • --dc-rpf-range=N β€” DC coefficients outside the quantization interval [-N,+N] are set to zero.

🌈 Additional Options for Video Compression 🌈

  • --smooth=N, -s N β€” smooth decompressed reference frames along the partitioning borders by the given amount N. N is 0 (no smoothing) to 100, and the default is 70. This factor is stored in the FIASCO file πŸ“
  • --min-level=N, -m N β€” start prediction (motion compensated prediction or additional prediction) on block level N. Default is level 6. I.e., motion compensation is applied to all image blocks of at least 8x8 pixels (binary tree level N=6), 16x8 (N=7), 16x16 (N=8), etc.
  • --max-level=N, -M N β€” stop prediction (motion compensated prediction or additional prediction) on block level N. Default is level 10. I.e., motion compensation is applied to all image blocks of at most 16x16 pixels (N=8), 32x16 (N=9), 32x32 (N=10), etc.
  • --half-pixel, -2 β€” use half pixel precise motion compensation. precision, she has it πŸ’…
  • --fps=N, -F N β€” set the number of frames per second to N. This value is stored in the FIASCO output file and is used in the decoder fiascotopnm(1) to control the framerate.
  • --pattern=type, -p type β€” defines the type of inter frame compression that should be applied to individual frames of a video stream. type is a sequence of characters, and the default is "IPPPPPPPPP". Element N defines the type of predicting that should be used for frame N, and the frame type pattern is periodically extended. Valid characters are:
    • I β€” intra frame, i.e., no motion compensated prediction is used at all.
    • P β€” predicted frame, i.e., a previously encoded frame is used for prediction (forward prediction).
    • B β€” bidirectional predicted frame, i.e., not only a previously shown frame but also a frame of the future is used for prediction (forward, backward or interpolated prediction).
  • --cross-B-search β€” instead of using exhaustive search, the "Cross-B-Search" algorithm is used to find the best interpolated prediction of B-frames.
  • --B-as-past-ref β€” also use previously encoded B-frames when predicting the current frame. If this option is not set, only I- and P-frames are used to predict the current frame. (so if you skip it, the B-frames are just out here being forgotten, rip 😭)

🧚 EXAMPLES 🧚

Compress the still image "foo.ppm" into the FIASCO file "foo.wfa" using the default options:

pnmtofiasco < foo.ppm >foo.wfa

Compress the video frames "foo0*.ppm" into the FIASCO file "video.wfa" using half pixel precise motion compensation at a frame rate of 15 frames per second. Intra frame 1 is used to predict P-frame 4, frames 1 and 4 are used to predict B-frames 2 and 3, and so on. Frame 10 is again an intra-frame:

pnmtofiasco -2 -p "IBBPBBPBB" -fps 15 -o video.wfa foo0*.ppm

look at her go 😭πŸ”₯


πŸ“ FILES πŸ“

  • /etc/system.fiascorc β€” the systemwide initialization file.
  • $HOME/.fiascorc β€” the personal initialization file.

πŸ’œ ENVIRONMENT πŸ’œ

  • FIASCO_IMAGES β€” search path for image files. Default is "./".
  • FIASCO_DATA β€” search and save path for FIASCO files. Default is "./".

⭐ SEE ALSO ⭐

fiascotopnm(1), pnmtojpeg(1), pnmtojbig(1), pamtogif(1), pnm(1)

Also, for the academically inclined girlies πŸ“š:

  • Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger. Weighted Finite Automata for Video Compression, IEEE Journal on Selected Areas In Communications, January 1998
  • Ullrich Hafner. Low Bit-Rate Image and Video Coding with Weighted Finite Automata, Ph.D. thesis, Mensch & Buch Verlag, ISBN 3-89820-002-7, October 1999.
  • FIASCO: An Open-Source Fractal Image and Sequence Codec, Linux Journal, January 2001.

πŸ‘‘ AUTHOR πŸ‘‘

Ullrich Hafner <hafner@bigfoot.de>


πŸ“œ 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/pnmtofiasco.html

and that's the whole page, bestie, we did it πŸŽ€ this whole thing comes to you from netpbm documentation, dated 09 April 2025 β€” Pnmtofiasco User Manual(1), periodt πŸ’–βœ¨

πŸ“¦ where this page comes from