Is it legal to say $f(E)=\emptyset$ if set $E$ not in the function $f$ domain In many inverse functions, I have seen $f^{-1}(E)=\emptyset$, where the set $E$ is not in the function $f$ range.
So, is it also right to say $f(E)=\emptyset$ if set $E$ not in the function domain.

The inverse image notation is very much standard; in most contexts, it may be used without clarification. The image of a set under a function is almost as standard. Given a function $f : X \to Y$, when seeing $f(E)$, it is typically understood that $E$ is a subset of $X$.
That said, the convention of saying $f(E) = \emptyset$ makes some sense when $E \cap X = \emptyset$. I would just put a note before using it that you're adopting this convention, as it is not widely used.
