Crossover of the photon spectral distribution in harmonic traps from 2D to 1D Home