#!/bin/bash
name=${1:-xwd}
name=${name%.png}
name=$name.png
sleep "${2:-3}"
shift ; shift
xwd "$@" | xwdtopnm | pnmtopng >"$name"
