OK, this is how far I've got: (1) I've tested Math::Matrix, and see that it works. (2) I've tested (and modified) the get_dctm and get_idctm routines; the versions in blur.pl now work. (3) Ian's adding x0/2 back in is close but not quite right; I've included that in the get_idctm routine. (explain this to Ian) (4) blur.pl runs without an error; however, the jpeg file that is created won't display. So something weird is going on in dct_transform, I think. Next testing steps : * make sure that we can output an untouched copy of the the original jpeg * look at the actual numbers for a tiny (like 4x4) jpeg (a) before anything happens, (b) after the DCT, (c) after the inverse DCT (d) make sure (a) and (c) are the same * make sure we can output this as an image that looks like the original (except for roundoff). Do this all on a miniscule file, not a 100x100 thing that we can't really examine.