#!/bin/rc
rfork e
switch($1){
case *.bmp *.BMP
ext=bmp
case *.gif *.GIF
ext=gif
case *.ico *.ICO
ext=ico
case *.jpg *.jpeg *.JPG *.JPEG
ext=jpg
case *.png *.PNG
ext=png
case *.ppm *.PPM
ext=ppm
case *.tga *.TGA
ext=tga
case *.tif *.tiff *.TIF *.TIFF
ext=tif
case *.v210 *.V210
ext=v210
case *.yuv *.YUV
ext=yuv
case *.bit *.BIT
iconv -c m8 $1 | resample -x 48 -y 48
exit
}
eval $ext -c $1 | iconv -c m8 | resample -x 48 -y 48
|