An image processing apparatus divides data related to an image into
bit-planes and performs a coding process on data of each of the
bit-planes. The image processing apparatus includes a multi-layer
generation part that divides codes obtained by the coding process into a
plurality of layers sequentially from the codes corresponding to higher
bit-planes such that the amount of the codes of each of the layers is
equal to or less than a predetermined value. A code generation part
generates coded data in units of the codes divided into the layers by the
multi-layer generation part.