You are here: Reference > Hand-Editing Configuration Files > Configuring Catalogs Using XML Files > The DynamicRange Element

The DynamicRange Element

The DynamicRange property limits the returned bit range of an image requested from Express Server.

If an image uses fewer bits than are allotted for storing the image, then setting the DynamicRange to omit the unused bits can save time in rendering and displaying an image.

The DynamicRange is specified as a minimum and maximum value representing the bits to be returned. Both values are required.

For example, 11-bit images are often stored as 16-bit images, with the upper five bits left empty; only the first 11 bits are meaningful. For an 11-bit image, you can set the DynamicRange minimum to 0 and maximum to 2047 (211 - 1).

Bits and values

Use this table to help determine minimum and maximum values.

Bit number n 2n-1 Bit number n 2n-1
0 0 16 65535
1 1 17 131071
2 3 18 262143
3 7 19 524287
4 15 20 1048575
5 31 21 2097151
6 63 22 4194303
7 127 23 8388607
8 255 24 16777215
9 511 25 33554431
10 1023 26 67108863
11 2047 27 134217727
12 4095 28 268435455
13 8191 29 536870911
14 16383 30 1073741823
15 32767 31 2147483647

To set the DynamicRange to cover bits 7 through 22, set minimum to 127 and maximum to 4194303.

Examples: The DynamicRange Element

The following returns just the lowest 11 bits of a 16-bit image.

   <Catalog enabled="true" name="ItsyBitsyImages">
      ...
      <DynamicRange minimum="0" maximum="2047" />
      ...
   </Catalog>

The following results a 16-bit span near the middle of a 32-bit range.

   <Catalog enabled="true" name="WhyBother">
      ...
      <DynamicRange minimum="127" maximum="4194303" />
      ...
   </Catalog>