Fixed logic for distortion and blur filters to scale and crop image correctly.