Solve the image out of range problem in transform filter.
Some test cases added