Patent ID: 7697767

Claim:
A code processing device which generates, from original codes having sets of partial codes with quality attributes and resolution attributes, output codes having a quality according to a specified quality value, the code processing device comprising: a rank assignment unit to assign ranks to the sets of partial codes respectively, wherein, when the sets of partial codes have different quality levels, a high rank is assigned to a set of partial codes having a low quality level, and when the sets of partial codes have a same quality level and different resolution levels, a high rank is assigned to a set of partial codes having a low resolution level; a partial code selecting unit to select sets of partial codes from among the original codes, which have the quality according to the specified quality value and are included in the output codes, in order of the ranks assigned by the rank assignment unit; and a code forming unit to form the output codes in which the sets of partial codes selected by the partial code selecting unit are included.