Improved performance of image filters. See Issue #462