Decided to resize with eResampleAlg=-1 (average) as this gives the smoothest result, so got rid of many lines of ugly code as well.