Fixed-pattern noise is one of the limiting factors of image quality and degrades the achievable spatial resolution. In the case of silicon sensors, the effects of nonuniformities due to doping inhomogeneities can be limited by operating the sensor in strong overdepletion. For high-granularity photon-counting pixel detectors, an additional high-frequency interpixel signal variation is an important factor for the achievable signal-to-noise ratio (SNR). It is a common practice to apply flatfield corrections to increase the SNR of a detector system. For the case of direct conversion detectors, it can be shown theoretically that the Poisson limit can be reached for floodfield irradiation. However, when used for imaging with spectral X-ray sources, flatfield corrections are less effective. This is partly a consequence. of charge sharing between adjacent pixels, which gives rise to an effective energy spectrum seen by the readout, which is different from the spectral content of the incident beam. In this paper, we present simulations and measurements of the limited applicability of flatfield corrections for spectral source imaging and investigate the origins of the high-frequency interpixel noise component. The model, calculations, and measurements performed suggest that flatfield correction maps for photon-counting detectors with a direct conversion Si sensor can be obtained from electrical characterization of the readout chip alone.