Patent ID: 7936937

Claim:
An image processing apparatus for encoding attribute data of each pixel of image data, which is expressed by L (L>1) bits to indicate ON or OFF state for each of a plurality of attributes, comprising: at least one processor configured to function as: an input unit adapted to input M×N attribute data for M×N pixels, where M and N are integer multiple of “L”; an encoding unit adapted to encode data expressed by L bits; a first encoding control unit adapted to supply the M×N attribute data input by said input unit to said encoding unit in an input order, thereby causing said encoding unit to execute encoding; a second encoding control unit adapted to convert the M×N attribute data input by said input unit into bit planes of bit 0 to bit L−1, extract L-bit data from one converted bit plane, and supply the extracted L-bit data to said encoding unit for each bit plane, thereby causing said encoding unit to execute encoding; and an output control unit adapted to compare an amount of encoded data generated by said encoding unit under the control of said first encoding control unit with an amount of encoded data generated by said encoding unit under the control of said second encoding control unit, select encoded data with a smaller amount, and output the selected encoded data and identification information representing the selected data.