1Pamaltsat User Manual(0)                              Pamaltsat User Manual(0)
2
3
4

NAME

6       pamaltsat  -  increase or decrease the saturation of an image using one
7       of several alternative methods.
8
9

SYNOPSIS

11       pamaltsat [-method name] [-strength number] [-linear] [infile]
12
13

DESCRIPTION

15       This program is part of Netpbm(1).
16
17       pamaltsat decreases or increases the saturation of a  Netpbm  image  by
18       one of various non-standard (alternative) methods.
19
20       The  input is a Netpbm image from Standard Input or a file named by the
21       arguments.  The output is a Netpbm image in the same format written  to
22       Standard Output.
23
24       The  most conventional way to change the saturation of an image is what
25       pambrighten does.
26
27
28

EXAMPLES

30       To increase saturation by a factor of 2.1 using the logarithmic method:
31
32            pamaltsat -method log -strength 2.1 test.ppm
33
34
35       To convert a color image to grayscale:
36
37           pamaltsat -strength 0 test.ppm
38
39
40
41

SATURATION METHODS

43       The following saturation methods are available.
44
45
46   Logarithmic Method
47       This saturation model is inspired by the concept of color integrity(1),
48       which works with color in terms of intensity ratios, where intensity is
49       a        value        of        the         luminosity         function
50https://en.wikipedia.org/wiki/Luminosity_function⟩   ,   rather   than
51       brightness, or the numerical value of the sample  in  the  image  file.
52       From  this viewpoint, it is natural to define the saturation of a color
53       as the ratio of maximum and minimum intensities of its  primary  compo‐
54       nents.  In  order, however, to make saturation an additive value and to
55       endow the -strength parameter with the semantics of a multiplier, it is
56       convenient  to operate on the logarithm of that ratio.  The addition of
57       such saturations acquires physical  sense,  and  multiplication  corre‐
58       sponds to the raising of intensity to the power of the multiplier.
59
60       With  this  method, pamaltsat raises the intensity of each component to
61       the power of the strength value. Since the total intensity of  the  re‐
62       sulting color will differ from that of the original, it is necessary to
63       restore the intensity by multiplying the component intensities  of  the
64       saturated  color by the ratio of the intensity of the original color to
65       that of the saturated color.
66
67       Although it is always possible to decrease saturation by any given fac‐
68       tor,  there are two cases where it cannot be increased.  When the total
69       intensity (or brightness) of a color is too high for the desired  satu‐
70       ration,  pamaltsat  applies  the maximum possible saturation that keeps
71       the original intensity.  For example, any color with at least one  com‐
72       ponent  at  the  maxiumum  is already fully saturated.  When one of the
73       primary components is zero, the definition of saturation given above no
74       longer works because of a zero in the denominator.  pamaltsat offers no
75       special treatment of this situation because it does not create  discon‐
76       tinuities  and  therefore  produces  no  visible  defects at reasonable
77       strength levels.  When, however,  strength  approaches  infinity,  each
78       color tends to its primary component with the highest intensity.
79
80       This method was invented by Anton Shepelev.
81
82
83
84   Spectral Method
85       This  is  the default method.  It treats color as a spectrum with three
86       bands: one for the intensity of each primary component.  Since  neutral
87       gray  has  a uniform (constant) spectrum, saturation can be measured as
88       the difference of the spectrum of the  given  color  from  the  uniform
89       spectrum  of the same total intensity.  The spectral method uses one of
90       the simplest measures of such a difference: the difference between  the
91       highest  and  lowest  component intensities, which is an additive value
92       and therefore amenable to multiplication with good physical sense.  Al‐
93       though  a  complete  hue-saturation  model can be dervied from this ap‐
94       proach, pamaltsat need not concern itself with  it  because  it  always
95       preserves both hue and total intensity.
96
97       In order to change saturation, pamaltsat first multiplies the intensity
98       of each component by the desired strength.  The saturation of  the  re‐
99       sult is the strength times the saturation of the original, and likewise
100       the total intensity, but it is then restored by subtraction of the neu‐
101       tral gray with a suitable intensity.
102
103       The  effect of this method on each component intensity may be expressed
104       in the following equation:
105
106           sat = orig * strength - Iorig * (strength - 1)
107
108
109       where sat is the saturated sample, orig the original sample, and  Iorig
110       the total intensity of the original color.
111
112       The  method  is also related to color integrity because both its opera‐
113       tions are part of that concept: multiplication of component intensities
114       by  the same quotient is an important operation because changes bright‐
115       ness but keeps color balance, and subtraction of a  constant  from  all
116       component  intensities  is described by the inventor of color integrity
117       as 'subtraction of white.'
118
119       This procedure may produce both negative and over-unity  component  in‐
120       tensities.   For  such samples, pamaltsat decreases the strength to the
121       highest value that keeps the resulting color in range.
122
123       This method was invented by Anton Shepelev.
124
125
126

OPTIONS

128       In addition to the options common to all programs  based  on  libnetpbm
129       (most notably -quiet, see
130        Common  Options ⟨index.html#commonoptions⟩ ), pamaltsat recognizes the
131       following command line options:
132
133
134
135       -method method
136              specifies the saturation method to use:
137
138
139              The default is spectrum
140
141
142       -strength strength
143              This specifies a real nonnegative factor whereby to modify satu‐
144              ration.   A  value  greater than unity will increase saturation,
145              whereas a value less than unity will  decrease  it.  Unity  will
146              leave  the image unchanged, and zero will produce greyscale out‐
147              put according to Rec 709.
148
149              pamaltsat preserves the total intensity of each pixel and  never
150              affects neutral gray pixels.
151
152              This option is mandatory.
153
154
155       -linear
156              This  tells  pamaltsat  that  the  input is the intensity-linear
157              variation of a Netpbm image forat, in which the samples are pro‐
158              portional  to light intensity rather than to brightness, as they
159              are in true-or gamma-adjusted- Netpbm image formats.
160
161
162

USAGE NOTES

164       Since pamaltsat does not affect neutral colors, you should  adjust  the
165       color balance before saturation. You can do this with pamlevels.
166
167
168

EXTENSIBILITY

170       pamaltsat  is  written  with an eye to extending it with new saturation
171       methods, which programmers are welcome to  contribute.   The  only  re‐
172       quirement  is that every new method depend on a single strength parame‐
173       ter with the semantics described under the -strength  command-line  op‐
174       tion.
175
176
177

SEE ALSO

179       pambrighten(1), ppmflash(1),
180
181
182

AUTHOR

184       This   program   was   first   submitted   by   Anton   Shepelev   (an‐
185       ton.txt@gmail.com).
186
187

HISTORY

189       pamaltsat was new in Netpbm 10.84 (September 2018).
190
191
192

Table Of Contents

194
195
196              SYNOPSIS ⟨#synopsis⟩
197
198
199
200              DESCRIPTION ⟨#description⟩
201
202
203
204              EXAMPLES ⟨#examples⟩
205
206
207
208              SATURATION METHODS ⟨#saturation_methods⟩
209
210
211
212              OPTIONS ⟨#options⟩
213
214
215
216              USAGE NOTES ⟨#usage_notes⟩
217
218
219
220              EXTENSIBILITY ⟨#extensibility⟩
221
222
223
224              SEE ALSO ⟨#seealso⟩
225
226
227
228              AUTHOR ⟨#author⟩
229
230
231
232              HISTORY ⟨#history⟩
233

DOCUMENT SOURCE

235       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
236       source.  The master documentation is at
237
238              http://netpbm.sourceforge.net/doc/pamaltsat.html
239
240netpbm documentation           14 September 2018      Pamaltsat User Manual(0)
Impressum