resolution option, adjusted to 16:9 aspect
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 9 Feb 2020 16:00:19 +0000 (17:00 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 9 Feb 2020 16:00:19 +0000 (17:00 +0100)
Assuming unifont or similar appearance.

termimg

diff --git a/termimg b/termimg
index 6599b3b743dc20f8bb50a63dd4f9b7671ec8d31f..d17805f072ddc3925e1cf391c6cdebaa81216a15 100755 (executable)
--- a/termimg
+++ b/termimg
@@ -1,10 +1,10 @@
 #!/bin/sh
-convert -compress none -resize 66x23 - pgm:- |
+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 //, " .oO@";
+my @ch = split //, " .:coO@";
 while (<>) {
        print $ch[ $_ * @ch >> 8 ] for /\d+/g;
        print $/;