1Ppmbrighten User Manual(0) Ppmbrighten User Manual(0)
2
3
4
6 ppmbrighten - change a PPM image's Saturation and Value
7
8
10 ppmbrighten [-normalize] [-saturation [+|-saturation_percent]] [-value
11 [+|-value_percent]] ppmfile
12
13
15 All options can be abbreviated to their shortest unique prefix.
16
17
19 This program is part of Netpbm(1).
20
21 ppmbrighten increases or decreases the Saturation and Value (from the
22 HSV color space) of each pixel of a PPM image. You specify the per
23 centage change for each of those parameters.
24
25 You can also remap the colors of the pixels so their Values cover the
26 full range of possible Values.
27
28 Hue-Saturation-Value, or HSV, is one way to represent a color, like the
29 more well-known RGB. Hue, Saturation, and Value are numbers in the
30 range from 0 to 1. We always capitalize them in this document when we
31 mean the number from the HSV color space, especially since "value" as a
32 conventional English word has a much more abstract meaning.
33
34 Value is a measure of how much total light intensity is in the color,
35 relative to some specified maximum (the PPM format is also defined in
36 terms of a specified maximum intensity -- For the purposes of this pro‐
37 gram, they are the same). In particular, it is the intensity of the
38 most intense primary color component of the color divided by the maxi‐
39 mum intensity possible for a component. Zero Value means black. White
40 has full Value.
41
42 Hue is an indication of the secondary color with the same intensity
43 that most closely approximates the color. A secondary color is made of
44 a combination of at most two of the primary colors.
45
46 Saturation is a measure of how close the color is to the color indi‐
47 cated by the Hue and Value. A lower number means more light of the
48 third primary color must be added to get the exact color. Full Satura‐
49 tion means the color is a secondary color. Zero Saturation means the
50 color is gray (or black or white). Decreasing the saturation of a
51 color tends to make it washed out.
52
53 If it is impossible to increase the Value of a pixel by the amount you
54 specify (e.g. the Value is .5 and you specify +200%), ppmbrighten
55 increases it to full Value instead.
56
57 If it is impossible to increase the Saturation of a pixel by the amount
58 you specify (e.g. it is already half saturated and you specify +200%),
59 ppmbrighten increases it to full Saturation instead.
60
61 For a simpler kind of brightening, you can use pamfunc -multiplier sim‐
62 ply to increase the intensity of each pixel by a specified per centage,
63 clipping each RGB component where the calculated intensity would exceed
64 full intensity. Thus, the brightest colors in the image would change
65 chromaticity in addition to not getting the specified intensity boost.
66 For decreasing brightness, pamfunc should do the same thing as ppm‐
67 brighten.
68
69 ppmflash does another kind of brightening. It changes the color of
70 each pixel to bring it a specified per centage closer to white. This
71 increases the value and saturation.
72
73
75 To double the Value of each pixel:
76 ppmbrighten -v 100
77
78 To double the Saturation and halve the value of each pixel:
79 ppmbrighten -s 100 -v -50
80
81
83 -value value_percent
84 This option specifies the amount, as a per centage, by which you
85 want to change the Value of each pixel. It may be negative.
86
87
88 -saturation value_percent
89 This option specifies the amount, as a per centage, by which you
90 want to change the Saturation of each pixel. It may be nega‐
91 tive.
92
93
94
95 -normalize
96 This option causes ppmbrighten to linearly remap the Values of
97 the pixels to cover the range 0 to 1. The option name is wrong
98 -- this operation is not normalization (it was named in error
99 and the name has been kept for backward compatibility).
100
101 ppmbrighten applies the brightening that you specify with the
102 -value option after the remapping.
103
104 Before Netpbm 10.14 (March 2003), your input must be from a
105 seekable file (not a pipe) to use -normalize. If it isn't, the
106 program fails with a bogus error message.
107
108
109
110
112 pgmnorm(1), ppmdim(1), pamfunc(1), ppmflash(1), pamdepth(1),
113 pnmgamma(1), ppmhist(1), ppm(1)
114
115
117 Copyright (C) 1990 by Brian Moffet. Copyright (C) 1989 by Jef
118 Poskanzer.
119
120 Permission to use, copy, modify, and distribute this software and its
121 documentation for any purpose and without fee is hereby granted, pro‐
122 vided that the above copyright notice appear in all copies and that
123 both that copyright notice and this permission notice appear in sup‐
124 porting documentation. This software is provided 'as is' without
125 express or implied warranty.
126
127
128
129netpbm documentation 09 January 2003 Ppmbrighten User Manual(0)