#!/bin/bash
if [ "$1" == "--help" ] ; then
	cat <<EOF
Apply a standard filter chain to the grey scale data in input.
EOF
	exit
fi
HOST="$1"
PORT="$1"
HOST=${HOST%:*}
PORT=${PORT#*:}
COOKIEFILE="$0"
COOKIEFILE="${COOKIEFILE%/scripts/*}/config/cookie"
COOKIE=`cat $COOKIEFILE`
ANSWER=$(colotux_confirm 200 100 " Warning: This script may 
take a few minutes to run.
--------------------------
         Proceed?")
if [ "$ANSWER" != "1" ] ; then
	exit
fi
netcat -w 1 $HOST $PORT >/dev/null <<EOF
COOKIE $COOKIE
disp 16
saveori
nlgs 2 1 10000
nlgs 0 1 10000
nlgs 1 1 10000
nlgs 2 4 64
nlgs 0 4 48
nlgs 1 4 24
mixori 0.5
nlgs 0 8 32
nlgs 1 8 24
nlgs 2 8 16
destroyori
disp 0
EOF
