Patent ID: 7916954

Claim:
An image encoding apparatus for encoding image data, comprising: a lossless encoding processing unit adapted to lossless-encode the image data for respective tiles each having a pre-set size; a determination unit adapted to determine for each tile based on a feature amount and attribute of image data in the tile of interest if the tile of interest is to be lossless-encoded or lossy-encoded, and to generate lossless/lossy determination information; a storage unit adapted to temporarily store the lossless-encoded data of the tile generated by said lossless encoding processing unit and the lossless/lossy determination information of said determination unit in association with each other; a lossy encoding processing unit adapted to decode the lossless-encoded data of a tile having lossy determination information in the encoded data stored in said storage unit and to lossy-encode the decoded data; an output unit adapted to output the lossy-encoded data generated by said lossy encoding processing unit and the lossless-encoded data having lossless determination information as encoded data of the image data to be encoded; and a control unit adapted to control said lossless encoding processing unit and said lossy encoding processing unit, wherein said lossy encoding processing unit comprises: a decoding unit adapted to decode the lossless-encoded data; a lossy encoding unit adapted to lossy-encode the decoded image data; a resolution converting unit adapted to convert the decoded image data into image data having a resolution lower than a resolution of the decoded image data; and a lossless encoding unit adapted to lossless-encode the image data converted by said resolution converting unit, wherein said control unit comprises: a first replacing unit adapted to control said decoding unit, said resolution converting unit, and said lossless encoding unit to replace the lossless-encoded data having the lossy determination information stored in said storage unit by lossless-encoded data of a lower resolution, every time the number of tiles, which is determined by said determination unit to be lossy-encoded, exceeds one of a plurality of different thresholds; and a second replacing unit adapted to control said decoding unit and said lossy encoding unit to replace the lossless-encoded data having the lossy determination information stored in said storage unit by lossy-encoded data upon completion of lossless encoding for one page by said lossless encoding processing unit.