Previous Next


                                                     345
SECTION 4.8                                                                           Images



that xmin < xmax and clips x values to this domain so that y = ymin for all x ≤ xmin ,
and y = ymax for all x ≥ xmax .

For a Decode array of the form [ Dmin Dmax ], this can be written as
                                  n
y = Interpolate ( x, 0, 2 – 1, D min , D max )

            ⎛     D max – D min ⎞
                                               -
  = D min + ⎜ x × ------------------------------ ⎟
            ⎝                 n
                           2 –1                  ⎠


where
  n is the value of BitsPerComponent
  x is the input value, in the domain 0 to 2n − 1
  Dmin and Dmax are the values specified in the Decode array
  y is the output value, to be interpreted in the image’s color space

Samples with a value of 0 are mapped to Dmin , those with a value of 2n − 1 are
mapped to Dmax , and those with intermediate values are mapped linearly be-
tween Dmin and Dmax . Table 4.40 lists the default Decode arrays for use with the
various color spaces. For most color spaces, the Decode arrays listed in the table
map into the full range of allowed component values. For an Indexed color space,
the default Decode array ensures that component values that index a color table
are passed through unchanged.

                                  TABLE 4.40 Default Decode arrays
COLOR SPACE                 Decode ARRAY

DeviceGray                  [ 0.0 1.0 ]

DeviceRGB                   [ 0.0 1.0 0.0 1.0 0.0 1.0 ]

DeviceCMYK                  [ 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 ]

CalGray                     [ 0.0 1.0 ]

CalRGB                      [ 0.0 1.0 0.0 1.0 0.0 1.0 ]

Lab                         [ 0 100 amin amax bmin bmax ] where amin , amax , bmin , and bmax
                            correspond to the values in the Range array of the image’s color
                            space

Previous Next