Time-stretch imaging is a novel ultrafast imaging technique, which is based on space-to-time-to-wavelength mapping. We proposed an anti-aliasing technique based on optical time-division multiplexing. With the anti-aliasing technique, we can acquire a large amount of image information by using relatively low-sampling-rate electronic digitizer. Numerical analysis shows that the image quality can be improved by 4.16 dB comparing to that without using the anti-aliasing technique and at least 2.3 dB comparing to those digital signal processing techniques such as bilinear, bicubic and nearest-neighbor interpolation and Lanczos resampling techniques. In addition, we experimentally demonstrated a line-scan imaging system, which has the scan rate of 38.88 MHz. Defects and scratches on the object that were not identifiable originally can be clearly distinguished after using the proposed anti-aliasing technique.