3 my ($file, $size) = @ARGV;
5 open my $pgm, '-|', convert => (
7 '+distort' => SRT => '0,0 1,.56 0',
8 -thumbnail => $size || '66x23',
11 <$pgm> eq "P2\n" or die "ascii pgm input required\n";
12 <$pgm>; <$pgm>; # ignore depth, dimensions
14 my @ch = split //, " .:coO@";
16 print $ch[ $_ * @ch >> 8 ] for /\d+/g;