We show that photoionization cross sections of atoms can be accurately extracted from the high-order-harmonic spectra generated by intense infrared lasers only if the degree of ionization in the gas medium is small, implying that for this purpose the high-order-harmonic generation spectra should be taken at low gas pressure and at low laser intensity experimentally.