{
    "content": [
        {
            "type": "text",
            "text": "# pamaltsat (man)\n\n## NAME\n\npamaltsat  - increase or decrease the saturation of an image using one of several alternative methods.\n\n## SYNOPSIS\n\npamaltsat [-method name] [-strength number] [-linear] [infile]\n\n## DESCRIPTION\n\nThis program is part of Netpbm(1).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **EXAMPLES**\n- **SATURATION METHODS** (2 subsections)\n- **OPTIONS** (3 subsections)\n- **USAGE NOTES**\n- **EXTENSIBILITY**\n- **SEE ALSO**\n- **AUTHOR**\n- **HISTORY**\n- **Table Of Contents**\n- **DOCUMENT SOURCE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pamaltsat",
        "section": "",
        "mode": "man",
        "summary": "pamaltsat  - increase or decrease the saturation of an image using one of several alternative methods.",
        "synopsis": "pamaltsat [-method name] [-strength number] [-linear] [infile]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "specifies the saturation method to use: The default is spectrum"
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This specifies a real nonnegative factor whereby to modify saturation. A value greater than unity will increase saturation, whereas a value less than unity will de‐ crease it. Unity will leave the image unchanged, and zero will produce greyscale out‐ put according to Rec 709. pamaltsat preserves the total intensity of each pixel and never affects neutral gray pixels. This option is mandatory."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This tells pamaltsat that the input is the intensity-linear variation of a Netpbm im‐ age forat, in which the samples are proportional to light intensity rather than to brightness, as they are in true-or gamma-adjusted- Netpbm image formats."
            }
        ],
        "examples": [
            "To increase saturation by a factor of 2.1 using the logarithmic method:",
            "pamaltsat -method log -strength 2.1 test.ppm",
            "To convert a color image to grayscale:",
            "pamaltsat -strength 0 test.ppm"
        ],
        "see_also": [
            {
                "name": "pambrighten",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pambrighten/1/json"
            },
            {
                "name": "ppmflash",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmflash/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "SATURATION METHODS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Logarithmic Method",
                        "lines": 30
                    },
                    {
                        "name": "Spectral Method",
                        "lines": 37
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "-method _",
                        "lines": 5
                    },
                    {
                        "name": "-strength _",
                        "lines": 11
                    },
                    {
                        "name": "-linear",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "USAGE NOTES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "EXTENSIBILITY",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "Table Of Contents",
                "lines": 40,
                "subsections": []
            },
            {
                "name": "DOCUMENT SOURCE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pamaltsat  - increase or decrease the saturation of an image using one of several alternative\nmethods.\n\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pamaltsat [-method name] [-strength number] [-linear] [infile]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This program is part of Netpbm(1).\n\npamaltsat decreases or increases the saturation of a Netpbm image by one of various non-stan‐\ndard (alternative) methods.\n\nThe input is a Netpbm image from Standard Input or a file named by the arguments.  The output\nis a Netpbm image in the same format written to Standard Output.\n\nThe most conventional way to change the saturation of an image is what pambrighten does.\n\n\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "To increase saturation by a factor of 2.1 using the logarithmic method:\n\npamaltsat -method log -strength 2.1 test.ppm\n\n\nTo convert a color image to grayscale:\n\npamaltsat -strength 0 test.ppm\n\n\n\n",
                "subsections": []
            },
            "SATURATION METHODS": {
                "content": "The following saturation methods are available.\n\n",
                "subsections": [
                    {
                        "name": "Logarithmic Method",
                        "content": "This saturation model is inspired by the concept of  color  integrity(1),  which  works  with\ncolor  in  terms of intensity ratios, where intensity is a value of the \u001b]8;;https://en.wikipedia.org/wiki/Luminosityfunction\u001b\\luminosity function\u001b]8;;\u001b\\ ,\nrather than brightness, or the numerical value of the sample in the image  file.   From  this\nviewpoint, it is natural to define the saturation of a color as the ratio of maximum and min‐\nimum intensities of its primary components. In order, however, to make saturation an additive\nvalue  and  to endow the -strength parameter with the semantics of a multiplier, it is conve‐\nnient to operate on the logarithm of that ratio.  The addition of such  saturations  acquires\nphysical  sense,  and  multiplication corresponds to the raising of intensity to the power of\nthe multiplier.\n\nWith this method, pamaltsat raises the intensity of  each  component  to  the  power  of  the\nstrength value. Since the total intensity of the resulting color will differ from that of the\noriginal,  it  is necessary to restore the intensity by multiplying the component intensities\nof the saturated color by the ratio of the intensity of the original color  to  that  of  the\nsaturated color.\n\nAlthough  it  is  always  possible  to decrease saturation by any given factor, there are two\ncases where it cannot be increased.  When the total intensity (or brightness) of a  color  is\ntoo  high  for the desired saturation, pamaltsat applies the maximum possible saturation that\nkeeps the original intensity.  For example, any color with at least one component at the max‐\niumum is already fully saturated.  When one of the primary components is zero, the definition\nof saturation given above no longer works because of a zero in  the  denominator.   pamaltsat\noffers  no special treatment of this situation because it does not create discontinuities and\ntherefore produces no visible defects at reasonable strength levels.  When, however, strength\napproaches infinity, each color tends to its primary component with the highest intensity.\n\nThis method was invented by Anton Shepelev.\n\n\n"
                    },
                    {
                        "name": "Spectral Method",
                        "content": "This is the default method.  It treats color as a spectrum with three bands: one for the  in‐\ntensity  of  each  primary  component.  Since neutral gray has a uniform (constant) spectrum,\nsaturation can be measured as the difference of the spectrum of the given color from the uni‐\nform spectrum of the same total intensity.  The spectral method uses one of the simplest mea‐\nsures of such a difference: the difference between the highest and lowest component  intensi‐\nties,  which is an additive value and therefore amenable to multiplication with good physical\nsense.  Although a complete hue-saturation model can be dervied from this approach, pamaltsat\nneed not concern itself with it because it always preserves both hue and total intensity.\n\nIn order to change saturation, pamaltsat first multiplies the intensity of each component  by\nthe  desired  strength.  The saturation of the result is the strength times the saturation of\nthe original, and likewise the total intensity, but it is then restored by subtraction of the\nneutral gray with a suitable intensity.\n\nThe effect of this method on each component intensity may be expressed in the following equa‐\ntion:\n\nsat = orig * strength - Iorig * (strength - 1)\n\n\nwhere sat is the saturated sample, orig the original sample, and Iorig the total intensity of\nthe original color.\n\nThe method is also related to color integrity because both its operations are  part  of  that\nconcept:  multiplication of component intensities by the same quotient is an important opera‐\ntion because changes brightness but keeps color balance, and subtraction of a  constant  from\nall  component intensities is described by the inventor of color integrity as 'subtraction of\nwhite.'\n\nThis procedure may produce both negative and over-unity component intensities.  For such sam‐\nples, pamaltsat decreases the strength to the highest value that keeps the resulting color in\nrange.\n\nThis method was invented by Anton Shepelev.\n\n\n"
                    }
                ]
            },
            "OPTIONS": {
                "content": "In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), pamaltsat recognizes the following command line options:\n\n\n",
                "subsections": [
                    {
                        "name": "-method _",
                        "content": "specifies the saturation method to use:\n\nThe default is spectrum\n\n"
                    },
                    {
                        "name": "-strength _",
                        "content": "This  specifies  a  real  nonnegative  factor  whereby  to modify saturation.  A value\ngreater than unity will increase saturation, whereas a value less than unity will  de‐\ncrease  it. Unity will leave the image unchanged, and zero will produce greyscale out‐\nput according to Rec 709.\n\npamaltsat preserves the total intensity of each pixel and never affects  neutral  gray\npixels.\n\nThis option is mandatory.\n\n"
                    },
                    {
                        "name": "-linear",
                        "content": "This  tells pamaltsat that the input is the intensity-linear variation of a Netpbm im‐\nage forat, in which the samples are proportional to light  intensity  rather  than  to\nbrightness, as they are in true-or gamma-adjusted- Netpbm image formats.\n\n\n"
                    }
                ]
            },
            "USAGE NOTES": {
                "content": "Since  pamaltsat  does  not affect neutral colors, you should adjust the color balance before\nsaturation. You can do this with pamlevels.\n\n\n",
                "subsections": []
            },
            "EXTENSIBILITY": {
                "content": "pamaltsat is written with an eye to extending it with new saturation methods, which  program‐\nmers  are  welcome  to contribute.  The only requirement is that every new method depend on a\nsingle strength parameter with the semantics described under the -strength  command-line  op‐\ntion.\n\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pambrighten(1), ppmflash(1),\n\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "This program was first submitted by Anton Shepelev (anton.txt@gmail.com).\n\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "pamaltsat was new in Netpbm 10.84 (September 2018).\n\n\n",
                "subsections": []
            },
            "Table Of Contents": {
                "content": "•\n\n\u001b]8;;#synopsis\u001b\\SYNOPSIS\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#description\u001b\\DESCRIPTION\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#examples\u001b\\EXAMPLES\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#saturationmethods\u001b\\SATURATION METHODS\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#options\u001b\\OPTIONS\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#usagenotes\u001b\\USAGE NOTES\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#extensibility\u001b\\EXTENSIBILITY\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#seealso\u001b\\SEE ALSO\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#author\u001b\\AUTHOR\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#history\u001b\\HISTORY\u001b]8;;\u001b\\\n",
                "subsections": []
            },
            "DOCUMENT SOURCE": {
                "content": "This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/pamaltsat.html\n\nnetpbm documentation                      14 September 2018                 Pamaltsat User Manual(1)",
                "subsections": []
            }
        }
    }
}