Patent ID: 8548233

Claim:
An image processing apparatus comprising: a division unit to divide an input image into a plurality of predetermined sized image pieces; a first output unit to determine code data indicating an arrangement pattern of color data included in each divided image piece and color data for the number of colors included in each divided image piece by comparing color data of respective pixels in the image piece, and to output the determined code data and the color data as first output data; a count unit to obtain the number of colors in each divided image piece and count the number of image pieces by the number of colors; a determination unit to, when the first output data output from said first output unit has a data size greater than or equal to a predetermined data size, determine a pattern for color reduction with respect to said plurality of image pieces in accordance with the number of image pieces by said counted number of colors and a priority of the pattern for color reduction; and a second output unit to perform color-reduction processing on an image piece corresponding to the pattern determined by said determination unit among said divided image pieces, then determine code data indicating an arrangement pattern of color data included in each image piece and color data for the number of colors included in the image piece by comparing color data of respective pixels in the image piece, and output the determined code data and the color data as second output data.