Where exactly does energy quantisation come in for light? Planck quantised the energy of light in order to solve the black body radiation problem. However, I am confused as to exactly what he quantised. On one hand, I have seen that he quantised the energy of oscillators in the black body (source below).

Source of photo
However, the second version of the story I've heard is that it is simply that light energy is given off in discrete chunks (where every photon itself can have any value of energy it likes depending on frequency and is not quantised). 
To me, the first idea doesn't make sense because $E=hf$ and as $f$ can be any real number that means the energy of each photon can be any real number. I would believe the second version, however I don't understand how this version of quantisation leads to reducing the number of high frequency waves emitted and thus solving the UV catastrophe. Could you please explain exactly how releasing energy in chunks (of arbitrary size themselves) means less will be released in the higher frequencies?
 A: EDIT: 
First of all, $E=hf$ is the energy of a photon. Now, if you take two photons, the enegy is twice that. You cannot have $1.5E$, since it does not make sense to talk about $1.5$ photons. Also, you misunderstood "discrete chunks" which is actually photons themselves. The energy is absorbed or emitted as photons. 
Obviously $hf$ could be any real number , but fractional values of $hf$ cannot exist. Only integral multiples are allowed. That is all.

If a body is heated (say a blackbody), it would radiate in all frequencies. This is common. What you would get if you used a detector to say apart the types of EM waves emitted, there would be a peak intensity at a certain frequency. There would be smaller intensities at all other frequencies. 
Here, $E=hf$ is not used. Instead, the curve for the blackbody radiation law uses the following one for a plot $B(\lambda,T)$ against $ \lambda$.
$$B(\lambda, T)= \frac{2hc^2}{\lambda^5(e^{\frac{hc}{\lambda kT}}-1)}$$
This peak is not a constant for a specific body, but only at that specific temperature. If you vary the temperature around, you would get peaks at different frequencies. 
