Patent ID: 8224101

Claim:
An image processing apparatus for encoding one of monochrome image data expressed by one color component and color image data expressed by N components, comprising: at least one processor operable to function as: an input unit adapted to input encoding target image data; an image identification unit adapted to identify whether the encoding target image data input by said input unit is monochrome image data or color image data; a switching unit adapted to pass the color image data when said image identification unit identifies the input image data as a color image, and rearrange M (2≦M≦N) component data in the monochrome image into pseudo data of M components of one pixel of a color image and output the data when said image identification unit identifies the input image data as a monochrome image; an acquisition unit adapted to acquire image data of each pixel block containing a plurality of pixels from the color image data output via said switching unit; a first encoding unit adapted to lossy-encode the acquired image data of the pixel block; a second encoding unit adapted to lossless-encode the acquired image data of the pixel block; a specific pattern determination unit adapted to determine whether the image data of the pixel block has a property of a preset specific pattern; and an output control unit adapted to select one of lossy-encoded data obtained by said first encoding unit and lossless-encoded data obtained by said second encoding unit on the basis of a data amount of the lossy-encoded data obtained upon encoding by said first encoding unit, a data amount of the lossless-encoded data obtained upon encoding by said second encoding unit, an identification result from said image identification unit, and a determination result from said specific pattern determination unit, and output the selected data, wherein said output control unit (a) outputs the lossless-encoded data when the identification result from said image identification unit indicates a monochrome image, (b) outputs one of the lossy-encoded data and the lossless-encoded data, which is designated in advance, when the identification result from said image identification unit indicates a color image, and said specific pattern determination unit determines that a pixel block of interest has the property of the specific pattern, and (c) outputs one of the lossy-encoded data and the lossless-encoded data, which has a smaller code amount, when the identification result from said image identification unit indicates a color image, and said specific pattern determination unit determines that the pixel block of interest does not have the property of the specific pattern.