An image processing apparatus generates code data by connecting a
plurality of first compressed codes output from one or more threads. The
image processing apparatus includes a compressing unit that compresses
image data by using the threads corresponding to divided compression
processes; an identification-information attaching unit that attaches
identification information to the first compressed codes thereby
generating second compressed codes; and a code-data generating unit that
generates code data including the second compressed codes.