a quite simple solution for rotating image.
a constant extra space solution for rotating image.