Patent ID: 7925098

Claim:
An image encoding apparatus for encoding each tile of an image, comprising: at least one processor configured to function as: a lossless encoding unit for losslessly encoding a tile of interest and outputting lossless encoded data; a lossy encoding unit for lossy-encoding a tile of interest and outputting lossy encoded data; a selection unit for selectively outputting one of the encoded data by comparing a code length of the lossless encoded data of the tile of interest with a code length of the lossy encoded data, and holding a total lossless encoded data amount MLS of the selectively outputted lossless encoded data and a total lossy encoded data amount MJP of the selectively outputted lossy encoded data; and a decision unit for, when a total encoded data amount of the image has exceeded a target amount, deciding a re-encoding method for re-starting encoding of the image by comparing MLS with MJP.