


DEVICE=/dev/video0
GRABOPT="-S -o png -D 5  -i sif -d $DEVICE"
negatif=/tmp/shoot.png
picz=/tmp/picz.tga

sleep 5
vgrabbj $GRABOPT > $negatif

pngtopnm $negatif | ppmtotga -rgb -norle > $picz
tga_effects $picz updown $picz
tga_effects $picz mirror $picz
tga_filtres $picz lopass $picz

# display $picz &
rm /tmp/ao*.tga 

for step in $(seq 20 8 240)
do
	img=$(printf "/tmp/ao%04d.tga" $step)

	r=$step
	g=$step
	b=$(( 256 - $step ))
	tga_effects $picz seuil $img $r $g $b
	tga_cadre $img bruit $img $r $g $b 50 
	echo $step = $r $g $b

done

echo faire la gif...
convert -delay 10 /tmp/ao*.tga shot.gif
