diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-09-09 03:06:54 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-09-09 03:06:54 +0000 |
commit | 2ab5fffd17f1e979ce63db9212331e51f53811fc (patch) | |
tree | f4a1e3a2c40c419ace8eb682322de05b889dc7eb | |
parent | 412ea2c1c8e8648262b79507a11ba8e141c4efee (diff) | |
download | netpbm-mirror-2ab5fffd17f1e979ce63db9212331e51f53811fc.tar.gz netpbm-mirror-2ab5fffd17f1e979ce63db9212331e51f53811fc.tar.xz netpbm-mirror-2ab5fffd17f1e979ce63db9212331e51f53811fc.zip |
miscellaneous update
git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@3957 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | pamarith.html | 16 | ||||
-rw-r--r-- | pamfunc.html | 19 |
2 files changed, 33 insertions, 2 deletions
diff --git a/pamarith.html b/pamarith.html index 02c348fa..4bda1c2d 100644 --- a/pamarith.html +++ b/pamarith.html @@ -2,7 +2,7 @@ <html><head><title>Pamarith User Manual</title></head> <body> <h1>pamarith</h1> -Updated: 03 January 2015 +Updated: 09 September 2020 <br> <a href="#index">Table Of Contents</a> @@ -76,6 +76,19 @@ contains the tuple (s) and the right input image contains the tuple (t1,t2,...tN), and the function is f, then the output image contains the tuple (f(s,t1),f(s,t2),...,f(s,tN)). + +<h3 id="pbmoddness">PBM Oddness</h3> + +<p>If you're familiar with the PBM format, you may find <b>pamarith</b>'s +operation on PBM images to be nonintuitive. Because in PBM black is +represented as 1 and white as 0, you might be expecting black minus black +to be white. + +<p>But the PBM format is irrelevant, because <b>pamarith</b> operates on the +numbers found in the PAM equivalent (see above). In a PAM black and white +image, black is 0 and white is 1. So black minus black is black. + + <h3 id="maxval">Maxval</h3> <p>The meanings of the samples with respect to the maxval varies @@ -277,6 +290,7 @@ that made it backward compatible with <b>pnmarith</b>. <li><a href="#synopsis">SYNOPSIS</a> <li><a href="#description">DESCRIPTION</a> <ul> + <li><a href="#pbmoddness">PBM Oddness</a> <li><a href="#maxval">Maxval</a> </ul> <li><a href="#note">NOTE: UNARY FUNCTIONS</a> diff --git a/pamfunc.html b/pamfunc.html index 2733722b..60d53d61 100644 --- a/pamfunc.html +++ b/pamfunc.html @@ -2,7 +2,7 @@ <html><head><title>Pamfunc User Manual</title></head> <body> <h1>pamfunc</h1> -Updated: December 2013 +Updated: 09 September 2020 <br> <a href="#index">Table Of Contents</a> @@ -43,6 +43,11 @@ input. <b>pamfunc</b> applies a simple transfer function to each sample in the input to generate the corresponding sample in the output. The options determine what function. +<p>The samples involved are PAM samples. If the input is PBM, PGM, or PPM, +the output will be that same format, but <b>pamfunc</b> applies the functions +to the PAM equivalent samples, yielding PAM equivalent samples. This can +be nonintuitive in the <a href="#pbmoddness">PBM</a> case. + <p><b>pamarith</b> is the same thing for binary functions -- it takes two images as input and applies a specified simple arithmetic function (e.g. addition) on pairs of samples from the two to produce the single @@ -109,6 +114,18 @@ more significant bits than the width indicated by the maxval. <p>For a shifting operation, the shift count you specify must not be greater than the width indicated by the maxval. +<h4 id="pbmoddness">PBM Oddness</h4> + +<p>If you're familiar with the PBM format, you may find <b>pamfunc</b>'s +operation on PBM images to be nonintuitive. Because in PBM black is +represented as 1 and white as 0 (1.0 and 0.0 normlized), you might be +expecting adding 1 to white to yield black. + +<p>But the PBM format is irrelevant, because <b>pamfunc</b> operates on the +numbers found in the PAM equivalent (see above). In a PAM black and white +image, black is 0 and white is 1 (0.0 and 1.0 normalized). So white plus 1 +(clipped to the maximum of 1.0) is white. + <h2 id="options">OPTIONS</h2> |