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

NAME

6       pamlevels - effect a 'levels' transformation
7
8

SYNOPSIS

10       pamlevels  -from1  from1  -to1  to1 -from2 from2 -to2 to2 [-from3 from3
11       -to3 to3] [-linear] [-fitbrightness] [pamfile]
12
13

DESCRIPTION

15       This program is part of Netpbm(1).
16
17       pamlevels reads a Netpbm image from pamfile or standard input,  applies
18       a  'levels' transformation, and sends the result to standard output. It
19       finds a unique transformation that maps color from1 to to1, color from2
20       to  to2, and-if -from3 and -to3 are supplied-color from3 to to3. Trans‐
21       formations based on two mappings are  linear  in  light  intensity  and
22       those based on three mappings quadratic.  The color-mapping options may
23       be shortened to -f1...-f3 and -t1...-t3.
24
25       Color values have the following format: color[:scale], where color is a
26        Netpbm color  specification  ⟨libppm.html#colorname⟩    and  scale  an
27       optional  coefficient that is applied to the intensity (i.e. not gamma-
28       adjusted) of each RGB component of color.
29
30       When the transformation is linear (i.e. uses  two  mappings)  and  pre‐
31       serves  zero  (i.e. maps black to black), it corresponds to multiplica‐
32       tion of light intensity by a constant and preserves color integrity(1).
33
34
35

EXAMPLES

37       In the examples below, \ denotes a line continuation:
38
39       To brighten an image by setting a darker white point- -f2 white:0.9 -t2
40       white in.ppm > out.ppm</pre>
41
42       To adjust the white point-
43       pamlevels -f1 black -t1 black\
44       -f2 rgbi:0.9/0.83/0.80 -t2 white in.ppm > out.ppm</pre>
45
46       To set a lighter black point-
47       -f2 white -t2 white in.ppm > out.ppm</pre>
48
49       To increase brightness by compression-
50       -f1 black -t1 black -f2 white -t2 white \
51       -f3 white:0.5 -t3 white:0.6 in.ppm > out.ppm</pre>
52       The latter tranformation is similar to gamma-correction.
53
54

OPTIONS

56       -from1
57
58       -to1
59
60       -from2
61
62       -to2
63
64       -from3
65
66       -to3   These options define the mappings of input colors to output col‐
67              ors that anchor the transformation  function.   See  DESCRIPTION
68              ⟨#description⟩ .
69
70              You must specify at least two of these pairs.
71
72
73       -linear
74              This  option  tells  pamlevels to work with the intensity-linear
75              variation on PPM where the samples  are  proportional  to  light
76              intensity,  rather  than  brightness (gamma-adjusted) as in true
77              PPM.  The input must be of this form and the pamlevels makes the
78              output of this form.
79
80              Note   that   the   numbers   in   a  color  specification  like
81              rgbi:0.9/0.83/0.80  are   brightness   levels   (gamma-adjusted)
82              regardless of the input and output format.
83
84              You cannot use this with -fitbrightness because that function is
85              not implemented.
86
87
88       -fitbrightness
89              This option selects a transformation which is not very useful  -
90              it is linear or quadratic in brightness rather than light inten‐
91              sity of the pixels.  There is no physical  basis  for  doing  it
92              this way and the result is normally undesirable.
93
94              Note  that  many  tools  other than Netpbm do the transformation
95              this way.  One use for this option is simply to demonstrate  the
96              poor result of this method.
97
98              One  advantage  of  this  transformation  is  that it is faster,
99              because the input and output image formats use  brightness  val‐
100              ues.  The result is approximately correct.
101
102              You  cannot  use  this with -linear because that function is not
103              implemented.
104
105
106
107

SEE ALSO

109       pnmnorm(1), pamrecolor(1), pnmgamma(1), pnm(1)
110
111

AUTHOR

113       This    program    was    first    submitted    by    Anton    Shepelev
114       (anton.txt@gmail.com).
115
116

HISTORY

118       pamlevels was new in Netpbm 10.83 (June 2018).
119

DOCUMENT SOURCE

121       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
122       source.  The master documentation is at
123
124              http://netpbm.sourceforge.net/doc/pamlevels.html
125
126netpbm documentation             13 June 2018         Pamlevels User Manual(0)
Impressum