#!/bin/sh bmptopnm "$1" | ppmtopgm | pgmtopbm | pnmtotiff -g4 >"${1%.bmp}.tif" .