This is a faster version of the pnmconvol.c program that comes with netpbm. There are no changes to the command line arguments, so this program can be dropped in without affecting the way you currently run it. An updated man page is also included. My original intention was to improve the running time of applying a neighborhood averaging convolution matrix to an image by using a different algorithm, but I also improved the run time of performing the general convolution by optimizing that code. The general convolution runs in 1/4 to 1/2 of the original time and neighborhood averaging runs in near constant time for the convolution masks I tested (3x3, 5x5, 7x7, 9x9). Sample times for two computers are below. Times are in seconds as reported by /bin/time for a 512x512 pgm image. Matrix IBM RS6000 SUN IPC Size & Type 220 3x3 original pnmconvol 6.3 18.4 new general case 3.1 6.0 new average case 1.8 2.6 5x5 original pnmconvol 11.9 44.4 new general case 5.6 11.9 new average case 1.8 2.6 7x7 original pnmconvol 20.3 82.9 new general case 9.4 20.7 new average case 1.8 2.6 9x9 original pnmconvol 30.9 132.4 new general case 14.4 31.8 new average case 1.8 2.6 Send all questions/comments/bugs to me at burns@chem.psu.edu. - Mike