We don’t write into the memory right away, we first write to a temp buffer that we blit into the rotated image.
There is a bug for rotation = pi / 2