1. A method for preserving rate-distortion information associated with the compression of an input digital image, said method comprising the steps of: (a) decomposing the input digital image to produce a plurality of subbands, each subband having a plurality of subband coefficients; (b) quantizing the plurality of subband coefficients of each subband of the decomposed input digital image to produce a quantized output value for each subband coefficient of each subband; (c) partitioning each subband into a plurality of codeblocks; (d) forming at least one bit-plane from the quantized output values of subband coefficients of each codeblock of each subband; (e) entropy encoding each bit-plane of each codeblock for each subband in at least one pass to produce a compressed bit-stream corresponding to each pass, wherein each codeblock is entropy encoded independently of the other codeblocks; (f) computing a rate value and a distortion-reduction value for each pass; (g) providing a layer-table that specifies the number of expected layers and the criteria for forming the layers; (h) using the computed rate and distortion-reduction values to identify a set of passes and their corresponding compressed bit-streams that are included in each layer specified in the layer-table; (i) producing tagged rate and distortion-reduction tables from the computed rate values and distortion reduction values, wherein the rate values corresponding to passes which are segment boundaries are tagged; (j) ordering the compressed bit-streams corresponding to passes into layers to produce a compressed digital image file, wherein each layer includes compressed bit-streams corresponding to passes, from the identified set for that layer, that have not been included in any previous layers; and (k) storing the tagged rate and distortion-reduction tables as rate-distortion information in association with the compressed digital image file.