Comparing genus of domain and image for maps between Riemann surfaces. I've been asked to show that if $R$ and $S$ are compact, connected Riemann surfaces, and $f: R \to S$ is holomorphic then $g(R) \ge g(S)$ (g is the genus).

Now surely this fact follows from the fact that $f$ is an open map hence $f(R)$ is clopen hence $f(R) = S$ and so the surfaces are homeomorphic hence they have the same genus? But this shows in fact $g(R) = g(S)$ which is stronger? Have I missed something obvious here?

Thanks
Well, I reiterate use the Riemann-Hurwitz relation:

$$\chi(R)=n\chi(S)-B$$ where $B$ is the sum of all the ramifications.
Where $\chi(S)=2-2g(S)$ etc is the Euler characteristic.
Now if $g(S)=0$ then the result is clear. So assume that $g(S)\geq 1$ and thus 
$\chi(S)\leq 0$ this means that 

$$\chi(R)=n\chi(S)-B \leq \chi(S)$$

And $\chi(R) \leq \chi(S)$ gives $g(S)\leq g(R)$.
pull the holomorphic forms from $S$ back to $R$ and show they are independent.

Note that the genus is equal to the number of independent holomorphic 1-forms. That the pull-back of independent one forms is independent is obvious. So $g(S)\leq g(R)$.