{
    "content": [
        {
            "type": "text",
            "text": "# pnmtofiasco (man)\n\n## NAME\n\npnmtofiasco - Convert a portable anymap to FIASCO compressed file\n\n## SYNOPSIS\n\npnmtofiasco [option]...  [filename]...\n\n## DESCRIPTION\n\npnmtofiasco  compresses  the named pbm, pgm, or ppm image files, or Standard Input if no file\nis named, and produces a FIASCO file on Standard Output.\n\n## TLDR\n\n> Convert a PNM image to a compressed FIASCO file.\n\n- Convert a PNM image to a compressed FIASCO file:\n  `pnmtofiasco {{path/to/file.pnm}} > {{path/to/file.fiasco}}`\n- Specify the input files through a pattern:\n  `pnmtofiasco {{-i|--image-name}} \"{{img[01-09+1].pnm}}\" > {{path/to/file.fiasco}}`\n- Specify the compression quality:\n  `pnmtofiasco {{-q|--quality}} {{quality_level}} {{path/to/file.pnm}} > {{path/to/file.fiasco}}`\n- Load the options to be used from the specified configuration file:\n  `pnmtofiasco {{-f|--config}} {{path/to/fiascorc}} {{path/to/file.pnm}} > {{path/to/file.fiasco}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (6 subsections)\n- **EXAMPLES**\n- **FILES**\n- **ENVIRONMENT**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pnmtofiasco",
        "section": "",
        "mode": "man",
        "summary": "pnmtofiasco - Convert a portable anymap to FIASCO compressed file",
        "synopsis": "pnmtofiasco [option]...  [filename]...",
        "tldr_summary": "Convert a PNM image to a compressed FIASCO file.",
        "tldr_examples": [
            {
                "description": "Convert a PNM image to a compressed FIASCO file",
                "command": "pnmtofiasco {{path/to/file.pnm}} > {{path/to/file.fiasco}}"
            },
            {
                "description": "Specify the input files through a pattern",
                "command": "pnmtofiasco {{-i|--image-name}} \"{{img[01-09+1].pnm}}\" > {{path/to/file.fiasco}}"
            },
            {
                "description": "Specify the compression quality",
                "command": "pnmtofiasco {{-q|--quality}} {{quality_level}} {{path/to/file.pnm}} > {{path/to/file.fiasco}}"
            },
            {
                "description": "Load the options to be used from the specified configuration file",
                "command": "pnmtofiasco {{-f|--config}} {{path/to/fiascorc}} {{path/to/file.pnm}} > {{path/to/file.fiasco}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-v",
                "long": "--version",
                "arg": null,
                "description": "Print pnmtofiasco version number, then exit. -V N, --verbose N Set level of verbosity to N. Level is 0 (no output at all), 1 (show progress meter), or 2 (show detailed compression statistics); default is 1. -B N, --progress-meter N Set type of progress-meter to N. The following types are available; default is 1: 0: no progress meter 1: RPM style progress bar using 50 hash marks 2: percentage meter -f name, --config=name Load parameter file name to initialize the options of pnmtofiasco. See file sys- tem.fiascorc for an example of the syntax. Options of pnmtofiasco are set by any of the following methods (in the specified order): 1) Global ressource file /etc/system.fiascorc 2) $HOME/.fiascorc 3) command line 4) --config=name"
            },
            {
                "flag": "-h",
                "long": "--info",
                "arg": null,
                "description": "Print brief help, then exit."
            },
            {
                "flag": "-H",
                "long": "--help",
                "arg": null,
                "description": "Print detailed help, then exit. The options for advanced users are: -b name, --basis-name=name Preload compression basis name into FIASCO. The basis name provides the initial com- pression dictionary. Either use one of the files \"small.fco\", \"medium.fco\", or \"large.fco\" that come with pnmtofiasco or create a new ASCII basis file. -z N, --optimize=N Set optimization level to N. Level is 0 (fastes) to 3 (slowest); default is 1. Be warned, the encoding time dra- matically increased when N=2 or N=3 while the compression performance only slightly improves."
            },
            {
                "flag": "-P",
                "long": "--prediction",
                "arg": null,
                "description": "Use additional predictive coding. If this optimization is enabled then the image is 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. -D N, --dictionary-size=N Set size of dictionary that is used when coding the luminance band to N; default is 10000, i.e., the dictionary is not restricted. -C N, --chroma-dictionary=N Set size of dictionary that is used when coding chroma bands to N; default is 40. -Q N, --chroma-qfactor=N Reduce the quality of chroma band compression N-times with respect to the user defined quality q of the luminance band compression (--quality=q); default is 2. -t N, --tiling-exponent=N Subdivide the image into 2^N tiles prior coding; default is 4, i.e. the image is sub- divided into 16 tiles. The processing order of the individual tiles is defined by the option --tiling-method=name. -T name, --tiling-method=name Order the individual image tiles (the image is subdivided into; see option --tiling- exponent=N) by method name; default is \"desc-variance\". desc-variance: Tiles with small variances are processed first. asc-variance: Tiles with large variances are processed first. desc-spiral: Tiles are process in spiral order starting in the middle. asc-spiral: Tiles are process 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. --dc-rpf-range=N DC coefficients outside the quantization interval [-N,+N] are set to zero. Additional options for video compression are: -s N, --smooth=N Smooth decompressed reference frames along the partitioning borders by the given amount N. N is 0 (no smoothing) to 100; default is 70. This factor is stored in the FIASCO file. -m N, --min-level=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. -M N, --max-level=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. -2, --half-pixel Use half pixel precise motion compensation. -F N, --fps=N Set number of frames per second to N. This value is stored in the FIASCO output file and is used in the decoder dfiasco(1) to control the framerate. -p type, --pattern=type Defines the type of inter frame compression which should be applied to individual frames of a video stream. type is a sequence of characters; default is \"IPPPPPPPPP\". Element N defines the type of predicting which should be used for frame N; 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 predic- tion)."
            },
            {
                "flag": "",
                "long": "--cross-B-search",
                "arg": null,
                "description": "Instead of using exhaustive search the \"Cross-B-Search\" algorithm is used to find the best interpolated prediction of B-frames."
            },
            {
                "flag": "",
                "long": "--B-as-past-ref",
                "arg": null,
                "description": "Also use previously encoded B-frames when prediction the current frame. If this option is not set, only I- and P-frames are used to predict the current frame."
            }
        ],
        "examples": [
            "pnmtofiasco < foo.ppm >foo.wfa",
            "Compress  the still image \"foo.ppm\" to the FIASCO file \"foo.wfa\" using the default op-",
            "tions.",
            "pnmtofiasco -2 -p \"IBBPBBPBB\" -fps 15 -o video.wfa foo0*.ppm",
            "Compress the video frames \"foo0*.ppm\" to 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."
        ],
        "see_also": [
            {
                "name": "fiascotopnm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/fiascotopnm/1/json"
            },
            {
                "name": "ppmtojpeg",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmtojpeg/1/json"
            },
            {
                "name": "pnmtojbig",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmtojbig/1/json"
            },
            {
                "name": "ppmtogif",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmtogif/1/json"
            },
            {
                "name": "pnm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 32,
                "subsections": [
                    {
                        "name": "-v, --version",
                        "lines": 28,
                        "flag": "-v",
                        "long": "--version"
                    },
                    {
                        "name": "-h, --info",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--info"
                    },
                    {
                        "name": "-H, --help",
                        "lines": 14,
                        "flag": "-H",
                        "long": "--help"
                    },
                    {
                        "name": "-P, --prediction",
                        "lines": 84,
                        "flag": "-P",
                        "long": "--prediction"
                    },
                    {
                        "name": "--cross-B-search",
                        "lines": 3,
                        "long": "--cross-B-search"
                    },
                    {
                        "name": "--B-as-past-ref",
                        "lines": 3,
                        "long": "--B-as-past-ref"
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pnmtofiasco - Convert a portable anymap to FIASCO compressed file\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pnmtofiasco [option]...  [filename]...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pnmtofiasco  compresses  the named pbm, pgm, or ppm image files, or Standard Input if no file\nis named, and produces a FIASCO file on Standard Output.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "All option names may be abbreviated; for example, --optimize may be written --optim or --opt.\nFor  most  options a one letter short option is provided.  Mandatory or optional arguments to\nlong options are mandatory or optional for short options, too.  Both short and  long  options\nare case sensitive.\n\nThe basic options are:\n\n-i name, --input-name=name\nCompress  the  named  images,  not Standard Input.  If name is -, read Standard Input.\nname has to be either an image filename or a template of the form:\n\nprefix[start-end{+,-}step]suffix\n\nTemplates are useful when compressing video streams: e.g., if you specify the template\nimg0[12-01-2].pgm, then pnmtofiasco compresses the images img012.pgm, img010.pgm, ...,\nimg002.pgm.\n\nIf name is a relative path, pnmtofiasco searches for the image files  in  the  current\ndirectory  and  in  the (colon-separated) list of directories given by the environment\nvariable FIASCOIMAGES.\n\n-o output-file, --output-name=name\nWrite FIASCO output to the named file, not to Standard Output.\n\nIf name is a relative path and the environment variable FIASCODATA is a  (colon-sepa-\nrated)  list  of  directories,  then  pnmtofiasco  writes the output file to the first\n(writable) directory of this list. Otherwise, pnmtofiasco write it to the current  di-\nrectory.\n\n-q N, --quality=N\nSet quality of compression to N.  Quality is 1 (worst) to 100 (best); default is 20.\n",
                "subsections": [
                    {
                        "name": "-v, --version",
                        "content": "Print pnmtofiasco version number, then exit.\n\n-V N, --verbose N\nSet  level of verbosity to N.  Level is 0 (no output at all), 1 (show progress meter),\nor 2 (show detailed compression statistics); default is 1.\n\n-B N, --progress-meter N\nSet type of progress-meter to N.  The following types are available; default is 1:\n\n0: no progress meter\n\n1: RPM style progress bar using 50 hash marks\n\n2: percentage meter\n\n-f name, --config=name\nLoad parameter file name to initialize the options  of  pnmtofiasco.   See  file  sys-\ntem.fiascorc  for  an  example of the syntax. Options of pnmtofiasco are set by any of\nthe following methods (in the specified order):\n\n1) Global ressource file /etc/system.fiascorc\n\n2) $HOME/.fiascorc\n\n3) command line\n\n4) --config=name\n",
                        "flag": "-v",
                        "long": "--version"
                    },
                    {
                        "name": "-h, --info",
                        "content": "Print brief help, then exit.\n",
                        "flag": "-h",
                        "long": "--info"
                    },
                    {
                        "name": "-H, --help",
                        "content": "Print detailed help, then exit.\n\nThe options for advanced users are:\n\n-b name, --basis-name=name\nPreload compression basis name into FIASCO. The basis name provides the  initial  com-\npression  dictionary.   Either  use  one  of  the  files \"small.fco\", \"medium.fco\", or\n\"large.fco\" that come with pnmtofiasco or create a new ASCII basis file.\n\n-z N, --optimize=N Set optimization level to\nN. Level is 0 (fastes) to 3 (slowest); default is 1. Be warned, the encoding time dra-\nmatically  increased  when  N=2 or N=3 while the compression performance only slightly\nimproves.\n",
                        "flag": "-H",
                        "long": "--help"
                    },
                    {
                        "name": "-P, --prediction",
                        "content": "Use additional predictive coding. If this optimization is enabled then  the  image  is\ncompressed  in  two  steps.  In the first step, a coarse approximation of the image is\ncomputed using large unichrome blocks. Finally, the delta image is  computed  and  the\nprediction error is approximated using the standard FIASCO algorithm.\n\n-D N, --dictionary-size=N\nSet  size  of  dictionary that is used when coding the luminance band to N; default is\n10000, i.e., the dictionary is not restricted.\n\n-C N, --chroma-dictionary=N\nSet size of dictionary that is used when coding chroma bands to N; default is 40.\n\n-Q N, --chroma-qfactor=N\nReduce the quality of chroma band compression N-times with respect to the user defined\nquality q of the luminance band compression (--quality=q); default is 2.\n\n-t N, --tiling-exponent=N\nSubdivide  the image into 2^N tiles prior coding; default is 4, i.e. the image is sub-\ndivided into 16 tiles. The processing order of the individual tiles is defined by  the\noption --tiling-method=name.\n\n-T name, --tiling-method=name\nOrder  the  individual image tiles (the image is subdivided into; see option --tiling-\nexponent=N) by method name; default is \"desc-variance\".\n\ndesc-variance: Tiles with small variances are processed first.\n\nasc-variance: Tiles with large variances are processed first.\n\ndesc-spiral: Tiles are process in spiral order starting in the middle.\n\nasc-spiral: Tiles are process in spiral order starting at the border.\n\n--rpf-mantissa=N\nUse N mantissa bits for quantized coefficients.\n\n--dc-rpf-mantissa=N\nUse N mantissa bits for quantized DC coefficients.\n\n--rpf-range=N\nCoefficients outside the quantization interval [-N,+N] are set to zero.\n\n--dc-rpf-range=N\nDC coefficients outside the quantization interval [-N,+N] are set to zero.\n\nAdditional options for video compression are:\n\n-s N, --smooth=N\nSmooth decompressed reference frames along  the  partitioning  borders  by  the  given\namount  N.  N  is 0 (no smoothing) to 100; default is 70. This factor is stored in the\nFIASCO file.\n\n-m N, --min-level=N\nStart prediction (motion compensated prediction or  additional  prediction)  on  block\nlevel  N; default is level 6. I.e., motion compensation is applied to all image blocks\nof at least 8x8 pixels (binary tree level N=6), 16x8 (N=7), 16x16 (N=8), etc.\n\n-M N, --max-level=N\nStop prediction (motion compensated prediction  or  additional  prediction)  on  block\nlevel N; default is level 10. I.e., motion compensation is applied to all image blocks\nof at most 16x16 pixels (N=8), 32x16 (N=9), 32x32 (N=10), etc.\n\n-2, --half-pixel\nUse half pixel precise motion compensation.\n\n-F N, --fps=N\nSet number of frames per second to N. This value is stored in the FIASCO  output  file\nand is used in the decoder dfiasco(1) to control the framerate.\n\n-p type, --pattern=type\nDefines  the  type  of  inter  frame compression which should be applied to individual\nframes of a video stream. type is a sequence of characters; default  is  \"IPPPPPPPPP\".\nElement  N  defines the type of predicting which should be used for frame N; the frame\ntype pattern is periodically extended. Valid characters are:\n\nI: intra frame, i.e., no motion compensated prediction is used at all.\n\nP: predicted frame, i.e., a previously encoded frame is used for  prediction  (forward\nprediction).\n\nB:  bidirectional  predicted frame, i.e., not only a previously shown frame but also a\nframe of the future is used for prediction (forward, backward or interpolated  predic-\ntion).\n",
                        "flag": "-P",
                        "long": "--prediction"
                    },
                    {
                        "name": "--cross-B-search",
                        "content": "Instead  of using exhaustive search the \"Cross-B-Search\" algorithm is used to find the\nbest interpolated prediction of B-frames.\n",
                        "long": "--cross-B-search"
                    },
                    {
                        "name": "--B-as-past-ref",
                        "content": "Also use previously encoded B-frames when prediction the current frame. If this option\nis not set, only I- and P-frames are used to predict the current frame.\n",
                        "long": "--B-as-past-ref"
                    }
                ]
            },
            "EXAMPLES": {
                "content": "pnmtofiasco < foo.ppm >foo.wfa\nCompress  the still image \"foo.ppm\" to the FIASCO file \"foo.wfa\" using the default op-\ntions.\n\npnmtofiasco -2 -p \"IBBPBBPBB\" -fps 15 -o video.wfa foo0*.ppm\nCompress the video frames \"foo0*.ppm\" to the FIASCO file \"video.wfa\" using half  pixel\nprecise  motion compensation at a frame rate of 15 frames per second. Intra frame 1 is\nused to predict P-frame 4, frames 1 and 4 are used to predict B-frames 2 and 3, and so\non. Frame 10 is again an intra-frame.\n",
                "subsections": []
            },
            "FILES": {
                "content": "/etc/system.fiascorc\nThe systemwide initialization file.\n$HOME/.fiascorc\nThe personal initialization file.\n",
                "subsections": []
            },
            "ENVIRONMENT": {
                "content": "FIASCOIMAGES\nSearch path for image files. Default is \"./\".\nFIASCODATA\nSearch and save path for FIASCO files. Default is \"./\".\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "fiascotopnm(1), ppmtojpeg(1), pnmtojbig(1), ppmtogif(1), pnm(5)\n\nUllrich  Hafner,  Juergen  Albert, Stefan Frank, and Michael Unger.  Weighted Finite Automata\nfor Video Compression, IEEE Journal on Selected Areas In Communications, January 1998\nUllrich Hafner. Low Bit-Rate Image and Video Coding with Weighted Finite Automata, Ph.D. the-\nsis, Mensch & Buch Verlag, ISBN 3-89820-002-7, October 1999.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Ullrich Hafner <hafner@bigfoot.de>\n\nJuly 12, 2000                           pnmmtofiasco(1)",
                "subsections": []
            }
        }
    }
}