I am saving an image from the camera that was in landscape mode. so it gets saved in landscape mode and then i apply an overlay onto it that too is in landscape mode. I want to rotate that image and then save. e.g. if i have this

I want to rotate clockwise by 90 degrees once and make it this and save it to sdcard:

How is this to be accomplished?