Six specific defects in images captured on line-scan x-ray machines are discussed and software corrections are addressed. The corrections are intended to optimize the machine for the inspection of food products for hidden defects or contaminants. The defects include effects due to time constants in the preamplifier, decays (short and long term) of the phosphor in the detectors, gaps in the images at detector module boundaries, analog to digital converter (ADC) clipping of the photodiode signal, varying response between detectors to the low-energy end of the incident energy spectrum, and x-ray scattering. Of these, all but the long-term phosphor decay and scattering are corrected with software. While the long-term phosphor decay is of little consequence for food inspection, effects due to scattering are serious and must be addressed in the design of the detectors. The restored image is more suitable for image processing and thus for real-time sorting than the original image.