Next | Welcome to my ~/bin | 122 |
The main part of the program first calculates the names of the output files:
my @pnm = map to_pnm($_), @ARGV;
Then it converts the JPEG files to P?M files:
for (0..1) { run("djpeg $ARGV[$_] > $pnm[$_]"); my $info = run("pnmfile $pnm[$_]"); $size[$_] = [$info =~ /(\d+) by (\d+)/]; # print "Size of $pnm[$_]: @{$size[$_]}\n"; }
djpeg is provided by the JPEG reference implementation
It decompresses JPEG files, producing PPM output
Next | Menu | Copyright © 2005 M. J. Dominus |