JPEG 2000 and HD Photo (JPEG XR) enable the coding of images with several adaptivity provisions. These provisions allow taking into account the constraints of diverse usage environments. However, the actual adaptation of the coded bitstreams requires additional system complexity. This paper investigates how JPEG 2000 and HD Photo can be used in a standardized and XML-based framework for format-independent content adaptation in the compressed domain. An analysis is provided of the cost of providing adaptivity in the compressed domain, in terms of loss of coding efficiency, as well as in terms of the complexity of the format-agnostic adaptation system used. This complexity is expressed in terms of execution times. memory consumption, and file size overhead of the XML descriptions. Using the outcome of our analysis, a number of improvements are proposed that allow reducing the complexity of XML-based adaptation for JPEG 2000 and HD Photo, in particular the use of compact XML descriptions and an adaptation chain based on the Simple AN for XML (SAX). Compact XML descriptions contain a minimal amount of information for the purpose of adaptation-their use is enabled by introducing an additional lightweight pre- and post-processing step in the overall adaptation chain. Our results show that editing-style operations on JPEG 2000 and HD Photo bitstreams can be executed with a feasible complexity when relying on compact XML descriptions. These editing-style operations include exploiting spatial and quality scalability, as well as interactive extraction of regions-of-interest (ROIs). However, low-level operations in the compressed domain, such as rotating an image, cannot be supported. due to the need for entropy decoding and data reordering at macroblock or codeblock level. (C) 2008 Elsevier B.V. All rights reserved.