fixes to resample_image (as yet untested)
switched over convolve_image, untested