+# These commands should read from FILE1, and write to stdout.
+# All tmp files will be deleted afterward.
+#
+my @filters = (
+ "ppmtopgm FILE1 | pgmedge | pgmtoppm COLORS | ppmnorm",
+ "ppmtopgm FILE1 | pgmenhance | pgmtoppm COLORS",
+ "ppmtopgm FILE1 | $pgmoil | pgmtoppm COLORS",
+ "ppmtopgm FILE1 | pgmbentley | pgmtoppm COLORS",
+
+ "ppmrelief FILE1 | ppmtopgm | pgmedge | ppmrelief | ppmtopgm |" .
+ " pgmedge | pnminvert | pgmtoppm COLORS",
+
+ "ppmspread 71 FILE1 > FILE2 ; " .
+ " pnmarith -add FILE1 FILE2 ; ",
+
+ "pnmflip -lr < FILE1 > FILE2 ; " .
+ " pnmarith -multiply FILE1 FILE2 > FILE3 ; " .
+ " pnmflip -tb FILE3 | ppmnorm > FILE2 ; " .
+ " pnmarith -multiply FILE1 FILE2",
+
+ "pnmflip -lr FILE1 > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2",
+
+ "pnmflip -tb FILE1 > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2",
+
+ "pnmflip -lr FILE1 | pnmflip -tb > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2",
+
+ "ppmtopgm < FILE1 | pgmedge > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2 > FILE3 ; " .
+ " cp FILE3 FILE1 ; " .
+ " ppmtopgm < FILE1 | pgmedge > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2 > FILE3 ; " .
+ " ppmnorm < FILE1",
+
+ "pnmflip -lr < FILE1 > FILE2 ; " .
+ " pnmarith -multiply FILE1 FILE2 | ppmrelief | ppmnorm | pnminvert",
+
+ "pnmflip -lr FILE1 > FILE2 ; " .
+ " pnmarith -subtract FILE1 FILE2 | ppmrelief | ppmtopgm | pgmedge",
+
+ "pgmcrater -number 20000 -width WIDTH -height HEIGHT FILE1 | " .
+ " pgmtoppm COLORS > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2 > FILE3 ; " .
+ " pnmflip -tb FILE3 | ppmnorm > FILE2 ; " .
+ " pnmarith -multiply FILE1 FILE2",
+
+ "ppmshift 30 FILE1 | ppmtopgm | $pgmoil | pgmedge | " .
+ " pgmtoppm COLORS > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2",
+
+ "ppmpat -madras WIDTH HEIGHT | pnmdepth 255 > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2",
+
+ "ppmpat -tartan WIDTH HEIGHT | pnmdepth 255 > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2",
+
+ "ppmpat -camo WIDTH HEIGHT | pnmdepth 255 | ppmshift 50 > FILE2 ; " .
+ " pnmarith -multiply FILE1 FILE2",
+
+ "pgmnoise WIDTH HEIGHT | pgmedge | pgmtoppm COLORS > FILE2 ; " .
+ " pnmarith -difference FILE1 FILE2 | pnmdepth 255 | pnmsmooth",
+);
+
+
+# Any files on this list will be deleted at exit.
+#
+my @all_tmpfiles = ();
+
+sub exit_cleanup() {
+ print STDERR "$progname: delete tmp files\n" if ($verbose);
+ unlink @all_tmpfiles;