Generation of entropy by the emission of light