An image processing apparatus in which the amount of data bits for each of plural
block units is controlled to be the same for all block units, so as to facilitate
location of each block unit in coded image data without necessarily decoding the
entire image. Pixel image data which is formable into plural block units is input
for each block unit, and the input image data is orthogonally transformed. The
orthogonally-transformed image data is quantized, and variable-length coding is
performed on the quantized image data so as to generate variable-length code. The
amount of variable length code in each block unit is controlled to be no more than
a predetermined amount of data bits, with the predetermined amount being the same
for each block unit.