What affects the energy of a photon?

The energy of a photon is determined by its frequency or wavelength. The energy of a photon is directly proportional to its frequency and inversely proportional to its wavelength. This relationship is described by the equation: E = hf = hc/λ, where E is the energy of the photon, h is Planck's constant, f is the frequency of the photon, c is the speed of light, and λ is the wavelength of the photon. Thus, any change in frequency or wavelength will result in a corresponding change in the energy of a photon.