More sane ordering of rotations.
Added resizing using built-in bilinear interpolation.