Photon production in heavy-ion collisions and nuclear equation of state