| Next | Trivial Utilities | 132 |
This program is an example of using Perl as an improved Bourne Shell
The Perl here is 100% glue
The whole thing is basically a wrapper around the pnmarith command
This performs subtractions of P?M-format images
run("pnmarith $diff @pnm > $tmp");
run("xv $tmp");
run("rm -f $tmp @pnm") unless $LEAVE_TMP_FILES;
@pnm consts the names of the P?M versions of the original JPEGS:
sub to_pnm {
my $fn = shift;
$fn =~ s/\.jpe?g$//i;
$fn .= ".ppm";
$fn;
}
This converts foo, foo.jpg, and foo.jpeg to foo.ppm
| Next | Menu | ![]() |
Copyright © 2012 M. J. Dominus |