Fix orientation issue in saved images