We have developed a spatial demultiplexing/multiplexing algorithm for correcting sinusoidally scanned distorted images. In our approach, the scanned image is demultiplexed into equal spatial slots (strips) perpendicular to the scan direction. Each spatial slot is interpolated through either an oversampling or an undersampling algorithm, depending upon its location. The interpolated spatial slots are multiplexed to reconstruct the corrected image. The implementation of this algorithm shows that, for our 100-pixel-wide test image, depending upon the slot size, it is possible to retrieve at least 99% of the original image, as measured by the recovered energy.