An image processing apparatus for generating data to be used for image
processing, in which the image processing apparatus includes, a dividing
unit dividing code data of a compressed image into a plurality of
segments, a code size computing unit computing a code size corresponding
to each of the plurality of segments, and a memory unit storing the
corresponding relation between the code size and each of the plurality of
segments.