> new_image(x,y) = old_image(y, old_height - x)
If you implement this as a view (rather than imperatively), you can get the compiler to optimize out four successive rotations to nothing :)
https://blog.cy.md/2014/03/21/functional-image-processing-in...