SYNOPSIS
ppmtoarbtxt bodyskl [-hd headskl] [-tl tailskl] [ppmfile]


DESCRIPTION
This program is part of Netpbm.

ppmtoarbtxt generates simple text-based graphics formats based on for-
mat descriptions given as input. A text-based graphics format is one
in which an image is represented by text (like PNM plain format, but
unlike PNM raw format).

ppmtoarbtxt reads a PPM image as input. For each pixel in the image,
ppmtoarbtxt writes the contents of the skeleton file bodyskl, with
certain substitutions based on the value of the pixel, to stdout. The
substitutions are as follows:



#(ired format blackref whiteref)



#(igreen format blackref whiteref)


#(iblue format blackref whiteref)


#(ilum format blackref whiteref)


#(fred format blackref whiteref)



#(fgreen format blackref whiteref)


#(fblue format blackref whiteref)


#(flum format blackref whiteref)



#(width)


#(height)



#(posx)


#(posy)



If the skeleton file ends with a LF-character, ppmtoarbtxt ignores it
-- it does not include it in the output.


OPTIONS
-hd headskl


-tl tailskl



EXAMPLES
gray inversion
Here we generate a PGM plain-format image with gray inversion (like
ppmtopgm | pnminvert).

Contents of our head skeleton file:

P2
#(width) #(height)
255

Contents of our body skeleton file:

#(ilum %d 255 0)


povray file
Here we generate a povray file where each pixel is represented by a
sphere at location (x,y,z) = (posx,height-posy,luminance). The color
of the sphere is the color of the pixel.

Contents of our head skeleton:

#include 'colors.inc'
#include 'textures.inc'
camera {
location <#(width) * 0.6, #(height) * 0.7, 80>
look_at <#(width) * 0.5, #(height) * 0.5, 0>
}

light_source { <#(width) * 0.5, #(height) * 0.5, 25> color White
}

Contents of our body skeleton:

sphere { <#(posx),#(height)-#(posy),#(ilum %d 0 10)>, 0.5
texture {
pigment {
color rgb <#(fred),#(fgreen),#(fblue)>
}
finish {
phong 1
}
}
}


SEE ALSO
pnmtoplainpnm ppm


HISTORY
ppmtoarbtxt was added to Netpbm in Release 10.14 (March 2003). It
existed under the name ppmtotxt since 1995.


AUTHOR
Copyright (C) 1995 by Peter Kirchgessner



netpbm documentation 27 April 2003 Ppmtoarbtxt User Manual(0)