Next | Welcome to my ~/bin | 124 |
Next the program makes the two inputs the same size:
my $xmin= min($size[0][0], $size[1][0]); my $ymin= min($size[0][1], $size[1][1]);
for (0 .. 1) { next if $size[$_][0] == $xmin && $size[$_][1] == $ymin; run("pnmscale -xysize $xmin $ymin $pnm[$_] > $tmp"); run("mv $tmp $pnm[$_]"); }
pnmscale scales an image to the specified dimensions
Afterwards, the program does the actual subtraction using pnmarith
which we saw already
I don't know why I used run("mv ...") here instead of rename
The program does some option processing, but there's nothing new there
Next | Menu | Copyright © 2005 M. J. Dominus |