摘要 |
Image data is divided into blocks each of a 2×2 pixel size, and color-reduction processing is performed for the target block based on color data and attribute data of respective pixels forming the target block. A pattern flag indicating the layout pattern of color data contained in the target block is specified by comparing the color data of the respective pixels in the target block having undergone the color-reduction processing. Color data corresponding to a pixel at a position defined in advance in the block having undergone the color-reduction processing is extracted as color data of the first color. When it is determined that the number of colors in the block is one of two to four, color data of the second to fourth colors are extracted. The pattern flag, the color data of the first color of the block, and those of the second to fourth colors of the block are output. |