I don't think you've stated your question correctly. Given what you said:
Let f be a continuous function with domain S (subset of R) and image S' = f(S). If S' is an interval, then S is an interval.
This is clearly false:
Let and f(x)=x2. Then f(S)=[1,4], but S is not an interval.
Did you omit the hypothesis that f is one to one? But if so, the problem is trivial as you point out.