An image processing apparatus which inputs image area information constituted by a plurality of types of image area component data for each pixel of multilevel image data and compression-encodes the image area information, the image area information having a plurality of states corresponding to the plurality of types of image area component data, characterized by comprising: first encoding means for losslessly encoding the inputted image area information; storage means for storing encoded data losslessly encoded by said first encoding means; second encoding means for decompressing the encoded data stored in said storage means, losslessly encoding the encoded data again, and storing the data in said storage means; monitoring means for monitoring an amount of code generated by said first encoding means and detecting whether the amount of code has exceeded a target amount; and control means for, when said monitoring means detects that the amount of code exceeds the target amount, generating a request so that image area component data in the image area information encoded by said first encoding means and image area component data in the image area information decompressed by said second encoding means are converted in accordance with a predetermined condition that degenerates the number of states of the image area information, wherein when said control means issues a request to convert the image area component data, said first encoding means converts the requested image area component data in successively input image area information, encodes the data, and stores the data in said storage means, and said second encoding means converts the requested image area component data in the image area information obtained by decompressing the encoded data already stored in said storage means, re-encodes the decompressed data, and stores the data in the storage means. first encoding means for losslessly encoding the inputted image area information; storage means for storing encoded data losslessly encoded by said first encoding means; second encoding means for decompressing the encoded data stored in said storage means, losslessly encoding the encoded data again, and storing the data in said storage means; monitoring means for monitoring an amount of code generated by said first encoding means and detecting whether the amount of code has exceeded a target amount; and control means for, when said monitoring means detects that the amount of code exceeds the target amount, generating a request so that image area component data in the image area information encoded by said first encoding means and image area component data in the image area information decompressed by said second encoding means are converted in accordance with a predetermined condition that degenerates the number of states of the image area information, wherein when said control means issues a request to convert the image area component data, said first encoding means converts the requested image area component data in successively input image area information, encodes the data, and stores the data in said storage means, and said second encoding means converts the requested image area component data in the image area information obtained by decompressing the encoded data already stored in said storage means, re-encodes the decompressed data, and stores the data in the storage means.