Patent ID: 8553301

Claim:
An image processing apparatus comprising: a first specification unit configured to divide first image data into blocks each with a size of 2×2 pixels, sequentially to determine the divided blocks as first processing objects, and to compare color data of respective pixels in the block which is the first processing object, thereby specifying a first pattern flag indicating a placement pattern of the color data included in the block; a first extraction unit configured to extract, as first color data, color data corresponding to a pixel at a predefined position in the block with the size of 2×2 pixels, and, if the number of colors included in the block which is the first processing object is one of 2 to 4, further to extract second color data to fourth color data corresponding to the placement pattern defined in the specified, first pattern flag; a first output unit configured to output the first pattern flag of each block specified by said first specification unit, the first color data in each block extracted by said first extraction unit, and the second color data to fourth color data in each block extracted by said first extraction unit; a second color-reduction unit configured to divide second image data formed from the first color data output from said first output unit into blocks each with a size of 2×2 pixels, sequentially to determine the divided blocks as second processing objects, and to weight each pixel value based on the first pattern flag corresponding to each pixel that forms the block which is the second processing object, thereby performing color-reduction processing for the blocks which are the second processing objects; a second specification unit configure to compare color data of respective pixels in the block which is the second processing object after the color-reduction processing is performed by said second color-reduction unit, thereby to specify a second pattern flag indicating a placement pattern of the color data included in the block which is the second processing object; a second extraction unit configured to extract, as first color data, color data corresponding to a pixel at a predefined position in the block with the size of 2×2 pixels after the color-reduction processing is performed by said second color-reduction unit, and, if the number of colors included in the block which is the second processing object is one of 2 to 4, further to extract second color data to fourth color data corresponding to the placement pattern defined in the specified, second pattern flag; and a second output unit configured to output the second pattern flag of each block specified by said second specification unit, the first color data in each block extracted by said second extraction unit, and the second color data to fourth color data in each block extracted by said second extraction unit.