This paper discusses optimal wavelet packet basis selection within JPEG2000. Algorithms for rate-distortion optimal wavelet packet basis selection in JPEG2000 are presented and compared to more efficient wavelet packet basis selection schemes. Both isotropic and anisotropic wavelet packet bases are considered. For the first time, computationally efficient heuristics are compared to the best bases in the standardized coding framework of JPEG2000. For the first time, the maximum performance gains of custom wavelet packets in JPEG2000 can be assessed. The algorithms are evaluated on a wide range of highly textured image data.