1. A printing apparatus comprising: an image processing memory unit that stores image processing to be performed on image data in response to predetermined plural types of reference printing media; a spectral intensity measurement unit that measures spectral intensity as light intensity at predetermined plural types of measurement wavelengths by applying light to a printed medium before an image is printed thereon; an average spectral intensity memory unit that stores average spectral intensity obtained by measuring the spectral intensity at plural times and obtaining average values of the spectral intensity with respect to each measurement wavelength with respect to the plural types of reference printing media; a covariance information memory unit that stores covariance information obtained by measuring the spectral intensity at plural times and obtaining covariances of the spectral intensity among the plural measurement wavelengths with respect to the plural types of reference printing media; a Mahalanobis distance acquisition unit that acquires Mahalanobis distances between the printed medium and the plural types of reference printing media based on the spectral intensity, the average spectral intensity, and the covariance information; a medium type determination unit that determines a type of the printed medium from the plural reference printing media based on the Mahalanobis distances; and an image printing unit that performs the image processing stored in response to the determined reference printing medium on the image data and prints the image on the printed medium.