1. An image processing apparatus comprising: a processor configured to operate as: a reduction unit configured to execute color-number reduction processing for each block configured by a plurality of pixels included in a processing target image expressed by processing target image data, the color-number reduction processing comprising reducing the number of colors expressed by the plurality of pixels in the block to generate image data having the reduced number of colors from the processing target image data, a gradation-number of each color value included in the image data having the reduced number of colors being the same as a gradation-number of each color value included in the processing target image data; and a compression unit configured to execute compression processing using the image data having the reduced number of colors to generate compressed image data.