Update ImageRender code so it can render non-square images, also non-power of 2 (image still needs to be power of 2)