#!/bin/bash

TMPIMG=/dev/shm/T.tga

for src in i/*
do
	echo src $src
	dst="d/$(basename $src .png).tga"
	echo dst $dst
	convert -compress none -alpha off $src ${TMPIMG}

	tga_effects ${TMPIMG} water ${TMPIMG} 20

	case $(( $RANDOM % 42 )) in
		0) tga_effects ${TMPIMG} negate ${TMPIMG} ;;
		1) tga_applymap 1 ${TMPIMG} neon.map ${TMPIMG} ;;
		2) tga_filtres ${TMPIMG} hipass ${TMPIMG} ;;
		3) tga_cadre ${TMPIMG} rasta0 ${TMPIMG} 51 ;;
		5) sleep 2m
	esac

	tga_filtres  ${TMPIMG} lopass  ${TMPIMG} 
	tga_television ${TMPIMG} proto ${dst}  8

	sleep 30

done




