#!/bin/sh set -e t=.tmp.$$ xpmtoppm -alphaout="$t.pbm" "$1" > "$t.pnm" pnmcomp -alpha="$t.pbm" "$t.pnm" "$t.pbm" "$t.2.pnm" ppmtowinicon -andppms "$t.2.pnm" "$t.pbm" > "$2" rm "$t.pnm" "$t.pbm" "$t.2.pnm"