We present a new uniformity correction (Fourier energy correction) which is designed to correct for gamma camera non-uniformity caused by variations of the energy response function within a wide spectral range. A convolution model is used to describe the spatial distortions of the energy response function. The model is solved in Fourier space. A preliminary flood acquisition is required to obtain energy-dependent Fourier weights which are used to correct subsequent acquisitions. The influence of the parameters involved in the correction procedure is studied and the Fourier energy correction is compared to a conventional multiplicative energy correction for different acquisition geometries. The Fourier energy correction appears especially useful when the energy information associated with each detected photon is analysed using a fine sampling, or when windows different from the photopeak window are used.