summary refs log tree commit diff
path: root/ppmtoarbtxt.html
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-11-26 03:12:52 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-11-26 03:12:52 +0000
commit2c37964394a4433c5324ff032c406e0e935b95ac (patch)
tree0fde51b0ad938b663be1276fa2a3e597300c8f84 /ppmtoarbtxt.html
parent34e2be30fbaa648d3ca1c76249d3d3f00287bb11 (diff)
downloadnetpbm-mirror-2c37964394a4433c5324ff032c406e0e935b95ac.tar.gz
netpbm-mirror-2c37964394a4433c5324ff032c406e0e935b95ac.tar.xz
netpbm-mirror-2c37964394a4433c5324ff032c406e0e935b95ac.zip
miscellaneous update
git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@2326 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'ppmtoarbtxt.html')
-rw-r--r--ppmtoarbtxt.html21
1 files changed, 15 insertions, 6 deletions
diff --git a/ppmtoarbtxt.html b/ppmtoarbtxt.html
index 2fafbb8c..d6e97ddb 100644
--- a/ppmtoarbtxt.html
+++ b/ppmtoarbtxt.html
@@ -3,7 +3,7 @@
 <BODY>
 <H1>ppmtoarbtxt</H1>
 <BR>
-Updated: 27 April 2003
+Updated: 26 November 2014
 <BR>
 <A HREF="#index">Table Of Contents</A>
 
@@ -36,9 +36,16 @@ pixel, to stdout.  The substitutions are as follows:
 <DT><B>#(ired</B><I> format blackref whiteref</I><B>)</B>
 
 <DD>generates an integer in the range <I>blackref</I> to
-<I>whiteref</I> using <I>format</I> representing the red intensity of
-the pixel.  A red intensity of 0 becomes <I>blackref</I>; a red
-intensity of maxval becomes <I>whiteref</I>.
+<I>whiteref</I> in a format specified by <I>format</I> representing the red
+intensity of the pixel.  A red intensity of 0 becomes <I>blackref</I>; a red
+intensity of maxval becomes <I>whiteref</I>, with the rest linearly
+interpolated in between.
+
+<p><i>format</i> is a printf-like format specifier like &quot;%d&quot;.
+<b>ppmtoarbtxt</b> uses as the entire format string to a <b>fprintf</b> POSIX
+library call whose only other argument is the red itensity as an integer data
+type.  <b>ppmtoarbtxt</b> does not verify that your format string makes sense;
+there are values you could specify that could even crash the program.
 
 <p><B>#(ired)</B> is equivalent to <B>#(ired %d 0 255)</B>.
 
@@ -60,8 +67,10 @@ intensity of maxval becomes <I>whiteref</I>.
 <DD>Same as <B>#(ired...</B>, but generates a floating point number instead
 of an integer.
 
-<p>
-<B>#(fred)</B> is equivalent to <B>#(fred %f 0.0 1.0)</B>.
+<p>In this case, the second argument to the <b>fprintf</b> that uses 
+<i>format</i> has a double precision floating point data type.
+
+<p><B>#(fred)</B> is equivalent to <B>#(fred %f 0.0 1.0)</B>.
 
 <DT><B>#(fgreen</B><I> format blackref whiteref</I><B>)</B>