Production of photons in relativistic heavy-ion collisions