Fixed bugs with imageoffsets being adjusted incorrectly, and missing direction for new interpolation code