image rotation is saved properly