#!/bin/sh convert -compress none +distort SRT '0,0 1,.56 0' -thumbnail ${1:-66x23} - pgm:- | perl -e ' <> eq "P2\n" or die "ascii pgm input required\n"; <>; <>; # ignore depth, dimensions my @ch = split //, " .:coO@"; while (<>) { print $ch[ $_ * @ch >> 8 ] for /\d+/g; print $/; } '