This is a question taken (inferred) from Ex. 19, chap 3 in Rudin's Real and Complex Analysis book.
Let $\mu$ be Legesgue's measure on $X=[0,1]$. Given a measurable $L^{\infty}$ function $f:X\to C$, we denote by $E_f$ the essential image of $f$ (that is, the set of complex numbers $z\in C$ such that $\mu(f^{-1}(D(z,\epsilon))>0$ for all $\epsilon>0$, $D(z,\epsilon)$ being the disc of center $z$ and radius $\epsilon$). We also denote by $A_f$ the set of all numbers of the form $z_E=\mu(E)^{-1}\int_E fd\mu$ for some measurable subset $E\subset [0,1]$ with $\mu(E)>0$.
It can be shown (not too difficult), that $E_f$ is a closed compact set and that we always have the inclusions $R_f\subset \bar{A_f}={\rm Conv}(R_f)$, where ${\rm Conv}(R_f)$ denotes the convex enveloppe of $R_f$. (This property holds I think more generally for any finite diffuse measure on a locally compact space.)
The question is: is it true that for any $f\in L^{\infty}([0,1],\mu)$, the set $A_f$ is actually convex, and if so, how to prove it?