






Exactly...

I didn't want to mess with tga or rle.  So I wrote the following script. 
All you need is the very standard set of pbm utilities. 

This script is a .pov to .jpg converter.  Just run it like this:

  pov2jpg 1280 1024 fred.pov 

You will need to modify the path's in the script to reflect where you put
povray and its include files.  If you have a problem with disk space, you
can use named pipes instead of temporary files.

I hope you find it useful...

----------------------------------------------------------------------------

#!/bin/sh

if [ $# -lt 3 ] ; then
  echo "usage:  $0 width height sourcefile.pov other_options"
  exit
fi

width=$1
height=$2
datafile=$3
shift 3

#basedatafile=`echo $datafile | sed -e "s/\(.*\)\.pov/\1/"`

thedatafile=`basename $datafile` 
basedatafile=`basename $datafile .pov` 
dirdatafile=`dirname $datafile` 

cd $dirdatafile
/afs/rnd.sas.com/u/sherman/pov/povsrc/build/povray \
  +l/afs/rnd.sas.com/u/sherman/pov/povscn/include \
  +o/tmp/data$$ +w${width} +h${height} +fr +i${thedatafile} $*

echo " "
rawtopgm $width $height < /tmp/data$$.grn > /tmp/green$$
rawtopgm $width $height < /tmp/data$$.red > /tmp/red$$
rawtopgm $width $height < /tmp/data$$.blu > /tmp/blue$$
rgb3toppm /tmp/red$$ /tmp/green$$ /tmp/blue$$ | cjpeg > ${basedatafile}.jpg 
rm /tmp/red$$ /tmp/green$$ /tmp/blue$$ /tmp/data$$.grn /tmp/data$$.red \
   /tmp/data$$.blu
echo "Wrote output to ${basedatafile}.jpg"

---------------------------------------------------------------------------
