PAMALTSAT(1)

โœจ PAMALTSAT โœจ

omg hi bestie ๐Ÿ’– welcome to the Pamaltsat User Manual โ€” yes that's the General Commands Manual section (1), we're being Official today ๐Ÿ‘‘


๐ŸŒธ NAME ๐ŸŒธ

  • pamaltsat โ€” increases or decreases the saturation of an image using one of several alternative methods ๐ŸŽ€

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

pamaltsat [-method name] [-strength number] [-linear] [infile]

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

okay so first thing, this program is part of Netpbm(1) ๐Ÿ’… we're in the family, we're an icon, we're a legend, and we are the moment.

pamaltsat decreases or increases the saturation of a Netpbm image by one of various non-standard (alternative) methods. not the basic ones โ€” the alternative ones. like the cool indie ones ๐ŸŽธ

The input is a Netpbm image from Standard Input or a file named by the arguments. The output is a Netpbm image in the same format, written to Standard Output. so it's giving pipe-friendly, it's giving filter energy, it's giving main character ๐ŸŒˆ

lowkey important: the most conventional way to change the saturation of an image is what pambrighten does. so if you want vanilla, go there. this program is the spicy menu ๐Ÿซถ

๐Ÿ“ 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

no cap, that second one is the whole grayscale pipeline and it ate ๐Ÿ’…


๐ŸŒˆ SATURATION METHODS ๐ŸŒˆ

The following saturation methods are available. ๐Ÿ‘‡

๐Ÿงš Logarithmic Method

This saturation model is inspired by the concept of color integrity(1), which works with color in terms of intensity ratios, where intensity is a value of the luminosity function, rather than brightness, or the numerical value of the sample in the image file. ๐Ÿ‘€

From this viewpoint, it's natural to define the saturation of a color as the ratio of maximum and minimum intensities of its primary components. ๐ŸŒธ

In order, however, to make saturation an additive value and to endow the -strength parameter with the semantics of a multiplier, it is convenient to operate on the logarithm of that ratio. The addition of such saturations acquires physical sense, and multiplication corresponds to the raising of intensity to the power of the multiplier. math girlies rise up ๐Ÿ˜ญโœจ

With this method, pamaltsat raises the intensity of each component to the power of the strength value. Since the total intensity of the resulting color will differ from that of the original, it is necessary to restore the intensity by multiplying the component intensities of the saturated color by the ratio of the intensity of the original color to that of the saturated color. balance restored, universe healed ๐Ÿซถ

Although it is always possible to decrease saturation by any given factor, there are two cases where it cannot be increased:

  1. When the total intensity (or brightness) of a color is too high for the desired saturation, pamaltsat applies the maximum possible saturation that keeps the original intensity. For example, any color with at least one component at the maximum is already fully saturated. ๐Ÿ’€
  2. When one of the primary components is zero, the definition of saturation given above no longer works because of a zero in the denominator. pamaltsat offers no special treatment of this situation because it does not create discontinuities and therefore produces no visible defects at reasonable strength levels. When, however, strength approaches infinity, each color tends to its primary component with the highest intensity. ๐Ÿ™ˆ

This method was invented by Anton Shepelev. ๐Ÿ‘‘

๐Ÿ‘‘ Spectral Method

This is the default method. โญ

It treats color as a spectrum with three bands: one for the intensity of each primary component. Since neutral gray has a uniform (constant) spectrum, saturation can be measured as the difference of the spectrum of the given color from the uniform spectrum of the same total intensity. ๐Ÿฆ‹

The spectral method uses one of the simplest measures of such a difference: the difference between the highest and lowest component intensities, which is an additive value and therefore amenable to multiplication with good physical sense. Although a complete hue-saturation model can be derived from this approach, pamaltsat need not concern itself with it because it always preserves both hue and total intensity. periodt. ๐Ÿ’…

In order to change saturation, pamaltsat first multiplies the intensity of each component by the desired strength. The saturation of the result is the strength times the saturation of the original, and likewise the total intensity, but it is then restored by subtraction of the neutral gray with a suitable intensity. โœจ

The effect of this method on each component intensity may be expressed in the following equation:

sat = orig * strength - Iorig * (strength - 1)

where sat is the saturated sample, orig the original sample, and Iorig the total intensity of the original color. ๐Ÿงฎ

The method is also related to color integrity because both its operations are part of that concept: multiplication of component intensities by the same quotient is an important operation because it changes brightness but keeps color balance, and subtraction of a constant from all component intensities is described by the inventor of color integrity as 'subtraction of white.' ๐Ÿค

โš ๏ธ heads up bestie: this procedure may produce both negative and over-unity component intensities. For such samples, pamaltsat decreases the strength to the highest value that keeps the resulting color in range. no drama, it just clamps the vibe check ๐Ÿ˜Œ

This method was invented by Anton Shepelev. ๐Ÿ‘‘


๐Ÿ’… OPTIONS ๐Ÿ’…

In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamaltsat recognizes the following command line options:

  • -method method โ€” specifies the saturation method to use:

The default is spectrum ๐ŸŒˆ

  • -strength strength โ€” 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 decrease it. Unity will leave the image unchanged, and zero will produce greyscale output according to Rec 709. ๐ŸŽ€

pamaltsat preserves the total intensity of each pixel and never affects neutral gray pixels. ๐Ÿค

๐Ÿšจ This option is mandatory. like, fr fr, you cannot skip it. it's the main character of the flags ๐Ÿ‘‘
  • -linear โ€” This tells pamaltsat that the input is the intensity-linear variation of a Netpbm image format, in which the samples are proportional to light intensity rather than to brightness, as they are in true- or gamma-adjusted Netpbm image formats. ๐ŸŒž

๐ŸŒท USAGE NOTES ๐ŸŒท

Since pamaltsat does not affect neutral colors, you should adjust the color balance before saturation. You can do this with pamlevels. order of operations bestie, we love a workflow ๐Ÿ’–


๐Ÿงš EXTENSIBILITY ๐Ÿงš

pamaltsat is written with an eye to extending it with new saturation methods, which programmers are welcome to contribute. ๐Ÿ‘ฉโ€๐Ÿ’ปโœจ

The only requirement is that every new method depend on a single strength parameter with the semantics described under the -strength command-line option. that's it, that's the whole rule, go wild ๐ŸŒˆ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

pambrighten(1), ppmflash(1),


๐Ÿซถ AUTHOR ๐Ÿซถ

This program was first submitted by Anton Shepelev (anton.txt@gmail.com). thank you king ๐Ÿ‘‘


๐Ÿ“œ HISTORY ๐Ÿ“œ

pamaltsat was new in Netpbm 10.84 (September 2018). a lil vintage, a lil classic ๐ŸŽ€


๐Ÿ—‚๏ธ Table Of Contents ๐Ÿ—‚๏ธ

  • SYNOPSIS
  • DESCRIPTION
  • EXAMPLES
  • SATURATION METHODS
  • OPTIONS
  • USAGE NOTES
  • EXTENSIBILITY
  • SEE ALSO
  • AUTHOR
  • HISTORY

๐Ÿงพ 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/pamaltsat.html

okay that's the whole thing bestie ๐Ÿ’– this was netpbm documentation, dated 14 September 2018, and you just read the Pamaltsat User Manual(1). go saturate something. slay. periodt. ๐Ÿฆ‹โœจ๐Ÿ’…

๐Ÿ“ฆ where this page comes from