| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN"> |
| 2 |
<html><head><title>Pambrighten User Manual</title></head> |
| 3 |
<body> |
| 4 |
<h1>pambrighten</h1> |
| 5 |
Updated: 18 August 2020 |
| 6 |
<br> |
| 7 |
<a href="#index">Table Of Contents</a> |
| 8 |
|
| 9 |
<h2>NAME</h2> |
| 10 |
pambrighten - change a PPM image's Saturation and Value |
| 11 |
|
| 12 |
<h2 id="synopsis">SYNOPSIS</h2> |
| 13 |
|
| 14 |
<b>pambrighten</b> |
| 15 |
[<b>-saturation=</b>[<b>+</b>|<b>-</b>]<i>saturation_percent</i>] |
| 16 |
[<b>-value=</b>[<b>+</b>|<b>-</b>]<i>value_percent</i>] |
| 17 |
[<i>netpbmfile</i>] |
| 18 |
|
| 19 |
<p>Minimum unique abbreviation of option is acceptable. You may use |
| 20 |
double hyphens instead of single hyphen to denote options. You may use |
| 21 |
white space in place of the equals sign to separate an option name |
| 22 |
from its value. |
| 23 |
|
| 24 |
<h2 id="description">DESCRIPTION</h2> |
| 25 |
|
| 26 |
<p>This program is part of <a href="index.html">Netpbm</a>. |
| 27 |
|
| 28 |
<p><b>pambrighten</b> increases or decreases the Saturation and Value |
| 29 |
(from the HSV color space) of each pixel of a Netpbm image. You specify |
| 30 |
the percentage change for each of those parameters. |
| 31 |
|
| 32 |
<p>You can also remap the colors of the pixels so their Values cover the full |
| 33 |
range of possible Values. |
| 34 |
|
| 35 |
<p>The input image is from the file named <i>netpbmfile</i>, or Standard |
| 36 |
Input if <i>netpbmfile</i> is not specified. |
| 37 |
|
| 38 |
<p>The output format is the same as the input format and any extra channels, |
| 39 |
such as transparency, are passed through. |
| 40 |
|
| 41 |
<p>Hue-Saturation-Value, or HSV, is one way to represent a color, like the |
| 42 |
more well-known RGB. Hue, Saturation, and Value are numbers in the range from |
| 43 |
0 to 1. We always capitalize them in this document when we mean the number |
| 44 |
from the HSV color space, especially since "value" as a conventional English |
| 45 |
word has a much more abstract meaning. |
| 46 |
|
| 47 |
<p>Value is a measure of how bright the color is, relative to some specified |
| 48 |
maximum (the Netpbm formats are also defined in terms of a specified maximum |
| 49 |
brightness -- For the purposes of this program, they are the same). In |
| 50 |
particular, it is the brightness of the brightest primary color component of |
| 51 |
the color divided by the maximum brightness possible for a component. Zero |
| 52 |
Value means black. White has full Value. |
| 53 |
|
| 54 |
<p>Hue is an indication of the secondary color with the same brightness that |
| 55 |
most closely approximates the color. A secondary color is made of a |
| 56 |
combination of at most two of the primary colors. |
| 57 |
|
| 58 |
<p>Saturation is a measure of how close the color is to the color indicated by |
| 59 |
the Hue and Value. A lower number means more light of the third primary color |
| 60 |
must be added to get the exact color. Full Saturation means the color is a |
| 61 |
secondary color. Zero Saturation means the color is gray (or black or white). |
| 62 |
Decreasing the saturation of a color tends to make it washed out. |
| 63 |
|
| 64 |
<p>If it is impossible to increase the Value of a pixel by the amount you |
| 65 |
specify (e.g. the Value is .5 and you specify +200%), <b>pambrighten</b> |
| 66 |
increases it to full Value instead. |
| 67 |
|
| 68 |
<p>If it is impossible to increase the Saturation of a pixel by the amount |
| 69 |
you specify (e.g. it is already half saturated and you specify +200%), |
| 70 |
<b>pambrighten</b> increases it to full Saturation instead. |
| 71 |
|
| 72 |
<p>For a simpler kind of brightening, you can use <b>pamfunc -multiplier</b> |
| 73 |
simply to increase the brightness of each pixel by a specified percentage, |
| 74 |
clipping each RGB component where the calculated brightness would exceed full |
| 75 |
brightness. Thus, the brightest colors in the image would change chromaticity |
| 76 |
in addition to not getting the specified brightness boost. For |
| 77 |
<em>decreasing</em> brightness, <b>pamfunc</b> should do the same thing as |
| 78 |
<b>pambrighten</b>. |
| 79 |
|
| 80 |
<p><b>ppmflash</b> does another kind of brightening. It changes the color of |
| 81 |
each pixel to bring it a specified percentage closer to white. This increases |
| 82 |
the value and saturation. |
| 83 |
|
| 84 |
<p><b>pambrighten</b> is meant to replace <b>ppmbrighten</b>. It is the same |
| 85 |
as <b>ppmbrighten</b>, except that it recognizes the various Netpbm image |
| 86 |
formats rather than treating them all as PPM. The output format is the same |
| 87 |
as the input format and extra channels in a PAM image (such as a |
| 88 |
transparency channel) get passed through. |
| 89 |
|
| 90 |
<p>If you want to modify the hues in the image, use <b>pamhue</b>. |
| 91 |
|
| 92 |
|
| 93 |
<h2 id="examples">EXAMPLES</h2> |
| 94 |
<p>To double the Value of each pixel: |
| 95 |
<pre> |
| 96 |
pambrighten -value=100 |
| 97 |
</pre> |
| 98 |
|
| 99 |
<p>To double the Saturation and halve the Value of each pixel: |
| 100 |
<pre> |
| 101 |
pambrighten -saturation=+100 -value=-50 |
| 102 |
</pre> |
| 103 |
|
| 104 |
<h2 id="options">OPTIONS</h2> |
| 105 |
|
| 106 |
<p>In addition to the options common to all programs based on libnetpbm |
| 107 |
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions"> |
| 108 |
Common Options</a>), <b>pambrighten</b> recognizes the following |
| 109 |
command line options: |
| 110 |
|
| 111 |
<dl> |
| 112 |
<dt><b>-value=</b><i>value_percent</i> |
| 113 |
|
| 114 |
<dd>This option specifies the amount, as a percentage, by which you want to |
| 115 |
increase the Value of each pixel. It may be negative. |
| 116 |
<p> |
| 117 |
The default is zero. |
| 118 |
|
| 119 |
<dt><b>-saturation=</b><i>value_percent</i> |
| 120 |
|
| 121 |
<dd>This option specifies the amount, as a percentage, by which you want to |
| 122 |
increase the Saturation of each pixel. It may be negative. |
| 123 |
<p> |
| 124 |
The default is zero. |
| 125 |
|
| 126 |
</dl> |
| 127 |
|
| 128 |
<h2 id="seealso">SEE ALSO</h2> |
| 129 |
|
| 130 |
<a href="pnmnorm.html">pnmnorm</a>, |
| 131 |
<a href="ppmdim.html">ppmdim</a>, |
| 132 |
<a href="pamfunc.html">pamfunc</a>, |
| 133 |
<a href="ppmflash.html">ppmflash</a>, |
| 134 |
<a href="pamaltsat.html">pamaltsat</a>, |
| 135 |
<a href="pamdepth.html">pamdepth</a>, |
| 136 |
<a href="pnmgamma.html">pnmgamma</a>, |
| 137 |
<a href="pamhue.html">pamhue</a>, |
| 138 |
<a href="ppmhist.html">ppmhist</a>, |
| 139 |
<a href="ppm.html">ppm</a> |
| 140 |
|
| 141 |
<h2 id="history">HISTORY</h2> |
| 142 |
|
| 143 |
<p><b>pambrighten</b> was new in Netphm 10.86 (March 2019). It was a PAM |
| 144 |
conversion of the much older <b>ppmbrighten</b>. |
| 145 |
|
| 146 |
|
| 147 |
<h2 id="author">AUTHOR</h2> |
| 148 |
|
| 149 |
<p>Copyright (C) 1990 by Brian Moffet. |
| 150 |
Copyright (C) 1989 by Jef Poskanzer. |
| 151 |
|
| 152 |
<p> |
| 153 |
Permission to use, copy, modify, and distribute this software and its |
| 154 |
documentation for any purpose and without fee is hereby granted, provided |
| 155 |
that the above copyright notice appear in all copies and that both that |
| 156 |
copyright notice and this permission notice appear in supporting |
| 157 |
documentation. This software is provided "as is" without express or |
| 158 |
implied warranty. |
| 159 |
|
| 160 |
<hr> |
| 161 |
<h2 id="index">Table Of Contents</h2> |
| 162 |
<ul> |
| 163 |
<li><a href="#synopsis">SYNOPSIS</a> |
| 164 |
<li><a href="#description">DESCRIPTION</a> |
| 165 |
<li><a href="#examples">EXAMPLES</a> |
| 166 |
<li><a href="#options">OPTIONS</a> |
| 167 |
<li><a href="#seealso">SEE ALSO</a> |
| 168 |
<li><a href="#history">HISTORY</a> |
| 169 |
<li><a href="#author">AUTHOR</a> |
| 170 |
</ul> |
| 171 |
</body> |
| 172 |
</html> |