A non-transitory computer-readable storage medium storing a program for causing a computer to execute a control method for an image processing apparatus,
- the control method comprising:
- a step of generating a binary image for judging whether each of pixels constituting an image obtained is a background attribute or a character attribute;
- a step of determining one or more colors of a first type representative color based on a histogram of RGB values of pixels judged to be the background attribute based on the binary image among all the pixels constituting the image;
- a step of determining one or more colors of a second type representative color based on a histogram of RGB values of pixels judged to be the character attribute based on the binary image among all the pixels constituting the image;
- and
- a step of performing a color reduction processing with respect to the image to generate a color-reduced image, and
- wherein, in the color reduction processing, the RGB values of the pixels judged to be the background attribute based on the binary image among all the pixels constituting the image are converted into RGB values indicating the first type representative color, and the RGB values of the pixels judged to be the character attribute based on the binary image among all the pixels constituting the image are converted into RGB values indicating the second type representative color.