1. An image reading device comprising: infrared component forming means for forming an infrared component of an image of a document; infrared component detecting means for detecting an infrared component level of the infrared component for pixels of the image; defective infrared component detecting means for detecting a defective infrared component level of a defective pixel for which the detected infrared component level is less than a reference level; visible component forming means for forming a visible component of the image of the document; visible component detecting means for detecting a visible component level for the pixels of the image; correcting means for correcting the visible component level of the defective pixel to obtain a corrected visible component level for the defective pixel based on the reference level and the detected defective infrared component level for the defective pixel; visible image data obtaining means for outputting visible image data based on the detected visible component level of pixels other than the defective pixel and based on the corrected visible component level of the defective pixel; and reading condition determining means for determining a reading condition of the image of the document based on the visible image data.