Centrality dependence of the direct photonmultiplicity in heavy ion collisions