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. Ifnameis-, you read Standard Input.namehas 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 toN. Quality runs from1(worst) to100(best), and the default is20.--version,-vβ print thepnmtofiascoversion number, then dip out. bye βοΈ--verbose N,-V Nβ set the level of verbosity toN. The level is0(no output at all),1(show progress meter), or2(show detailed compression statistics). Default is1.--progress-meter N,-B Nβ set the type of progress meter toN. Here are your options, and the default is1:0β no progress meter1β RPM style progress bar using 50 hash marks2β percentage meter
--config=name,-f nameβ load the parameter filenameto initialize the options ofpnmtofiasco. Peepfile system.fiascorcfor an example of the syntax. Your options get set by any of these methods, and the order matters (in the specified order):
- Global resource file
/etc/system.fiascorc $HOME/.fiascorc- command line
--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 basisnameinto FIASCO. The basis name provides the initial compression dictionary. Either use one of the files"small.fco","medium.fco", or"large.fco"that come withpnmtofiasco, or go off and create a new ASCII basis file yourself. artiste behavior π--optimize=N,-z Nβ set the optimization level toN. Level is0(fastest) to3(slowest).
β οΈ Be warned, bestie: the encoding time dramatically increases whenN=2orN=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 toN. Default is10000, 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 toN. Default is40.--chroma-qfactor=N,-Q Nβ reduce the quality of chroma band compressionN-times relative to the user defined qualityqof the luminance band compression (--quality=q). Default is2.--tiling-exponent=N,-t Nβ subdivide the image into2^Ntiles prior coding. Default is4, 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 methodname. Default isdesc-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β useNmantissa bits for quantized coefficients.--dc-rpf-mantissa=Nβ useNmantissa 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 amountN.Nis0(no smoothing) to100, and the default is70. This factor is stored in the FIASCO file π--min-level=N,-m Nβ start prediction (motion compensated prediction or additional prediction) on block levelN. Default is level6. I.e., motion compensation is applied to all image blocks of at least8x8pixels (binary tree levelN=6),16x8(N=7),16x16(N=8), etc.--max-level=N,-M Nβ stop prediction (motion compensated prediction or additional prediction) on block levelN. Default is level10. I.e., motion compensation is applied to all image blocks of at most16x16pixels (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 toN. This value is stored in the FIASCO output file and is used in the decoderfiascotopnm(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.typeis a sequence of characters, and the default is"IPPPPPPPPP". ElementNdefines the type of predicting that should be used for frameN, 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
- 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