The rate-distortion optimality of a JPEG2000 codestream is determined by the density and distribution of the quality layers it contains. The allocation of quality layers is, therefore, a fundamental issue for JPEG2000 encoders, which commonly distribute layers logarithmically or uniformly spaced in terms of bitrate, and use a rate-distortion optimization method to optimally form them. This work introduces an allocation strategy based on the hypothesis that the fractional bitplane coder of JPEG2000 already generates optimal truncation points for the overall optimization of the image. Through these overall optimal truncation points, the proposed strategy is able to allocate quality layers without employing rate-distortion optimization techniques, to self-determine the density and distribution of quality layers, and to reduce the computational load of the encoder. Experimental results suggest that the proposed method constructs near-optimal codestreams in the rate-distortion sense, achieving a similar coding performance as compared with the common PCRD-based approach.