From 2c37964394a4433c5324ff032c406e0e935b95ac Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 26 Nov 2014 03:12:52 +0000 Subject: miscellaneous update git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@2326 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- ppmtoarbtxt.html | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'ppmtoarbtxt.html') diff --git a/ppmtoarbtxt.html b/ppmtoarbtxt.html index 2fafbb8c..d6e97ddb 100644 --- a/ppmtoarbtxt.html +++ b/ppmtoarbtxt.html @@ -3,7 +3,7 @@

ppmtoarbtxt


-Updated: 27 April 2003 +Updated: 26 November 2014
Table Of Contents @@ -36,9 +36,16 @@ pixel, to stdout. The substitutions are as follows:
#(ired format blackref whiteref)
generates an integer in the range blackref to -whiteref using format representing the red intensity of -the pixel. A red intensity of 0 becomes blackref; a red -intensity of maxval becomes whiteref. +whiteref in a format specified by format representing the red +intensity of the pixel. A red intensity of 0 becomes blackref; a red +intensity of maxval becomes whiteref, with the rest linearly +interpolated in between. + +

format is a printf-like format specifier like "%d". +ppmtoarbtxt uses as the entire format string to a fprintf POSIX +library call whose only other argument is the red itensity as an integer data +type. ppmtoarbtxt does not verify that your format string makes sense; +there are values you could specify that could even crash the program.

#(ired) is equivalent to #(ired %d 0 255). @@ -60,8 +67,10 @@ intensity of maxval becomes whiteref.

Same as #(ired..., but generates a floating point number instead of an integer. -

-#(fred) is equivalent to #(fred %f 0.0 1.0). +

In this case, the second argument to the fprintf that uses +format has a double precision floating point data type. + +

#(fred) is equivalent to #(fred %f 0.0 1.0).

#(fgreen format blackref whiteref) -- cgit 1.4.1