Changed the way interpolation functions are used in DrawSubImage