Compensation of DC component across the pixels in flat panels