Lines 514-632: Bilinear interpolation function. Uses fixed point arithmetic on integers for efficiency. The algorithm works well for scales [.5;inf.), but has VERY slight precision problems at scales <1.
Lines 634-801: Same as above plus multithreading.
Lines 801-923: Same as 514, except this one works well for scales [0;1], but produces nearest neighbor for scales (1;inf.). It's also ~50% more expensive.
Lines 925-1086: Same as above plus multithreading.
None of the functions can change the width-height ratio of a surface.