Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- my $n = 0;
- my @files = ();
- my $cmdTemplate = "convert -size 300x300 canvas:white -font helvetica -pointsize 210 -gravity north -draw \"text -30,10 'SYM'\" -pointsize 100 -gravity east -draw \"text 0,0 'MOD'\" -pointsize 100 -gravity south -draw \"text 0,0 'DIV'\" NUM.jpg";
- for my $c (split //, "#_23456789abcdefghijklmnopqrstuvwxyz") {
- my $sym = $c;
- my $mod = $n % 6;
- my $div = int($n/6);
- my $cmd = $cmdTemplate;
- $cmd =~ s/SYM/$sym/;
- $cmd =~ s/MOD/$mod/;
- $cmd =~ s/DIV/$div/;
- $cmd =~ s/NUM/$n/;
- system($cmd);
- push @files, "${n}.jpg";
- $n++;
- }
- system("rm -f all.jpg");
- my $fileArgs = join(' ', @files);
- system("montage ${fileArgs} -geometry +6+6 all.jpg");
- system("rm ${fileArgs}");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement