1. An image processing apparatus comprising: a color-information extracting unit that extracts color information from the read information obtained as a result of reading the document by using a document reader; a compression setting unit sets, based on the color information, a first compression format in which the number of colors contained in the read information is reduced to a predetermined number of colors when a total of a proportion of a color value which appears most frequently in the read information and a proportion of color values positioned within a predetermined range starting from the color value which appears most frequency in the read information exceeds a threshold, and sets, based on the color information, a second compression format in which the number of colors is greater than the number of colors used in the first compression format, when the total of the proportion of a color value which appears most frequently in the read information and the proportion of color values positioned within the predetermined range starting from the color value which appears most frequency in the read information is equal to or smaller than the threshold.