Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

Color Space IDs

JP2K_Old_xxx are old indexed value, JP2K_xxx are new direct values. More...

Defines

#define JP2K_Old_sLUM_SPACE   0
 The standard luminance space (same gamma as sRGB).
#define JP2K_Old_sRGB_SPACE   1
 The standard RGB space.
#define JP2K_Old_sYCC_SPACE   2
 YCC derivative of sRGB.
#define JP2K_Old_iccLUM_SPACE   3
 Monochrome space described by an embedded ICC profile.
#define JP2K_Old_iccRGB_SPACE   4
 3-colour space described by an embedded ICC profile
#define JP2K_bilevel1_SPACE   0
 used to indicate a bi-level image in which 0 means white and 1 means black.
#define JP2K_YCbCr1_SPACE   1
 Commonly used for data that originated from a video signal.
#define JP2K_YCbCr2_SPACE   3
 Commmonly used for data that originated as RGB, but has been converted to luminance and chrominance samples.
#define JP2K_YCbCr3_SPACE   4
 Commonly used for data that originated from a video signal.
#define JP2K_PhotoYCC_SPACE   9
 This is the colour encoding method used in the Photo CD system.
#define JP2K_CMY_SPACE   11
 Cyan-Magenta-Yellow colour space suitable for printing.
#define JP2K_CMYK_SPACE   12
 Same as JP2K_CMY_SPACE but with an extra channel for black ink.
#define JP2K_YCCK_SPACE   13
 This is an opponent representation for the JP2K_CMYK_SPACE.
#define JP2K_CIELab_SPACE   14
 This is the CIE Lab colour space.
#define JP2K_bilevel2_SPACE   15
 Same as JP2K_bilevel1_SPACE, exept that a value of 1 means white and 0 means black.
#define JP2K_sRGB_SPACE   16
 This is the standard RGB space used by JP2 files.
#define JP2K_sLUM_SPACE   17
 This is the standard luminance space used by JP2 files.
#define JP2K_sYCC_SPACE   18
 This is the standard opponent colour space used by JP2 files.
#define JP2K_CIEJab_SPACE   19
 This colour space is based on CIECAM97s (CIE Publication 131).
#define JP2K_esRGB_SPACE   20
 This is an extended form of the sRGB colour space, designed to allow colours with a larger gamut than that of sRGB to be represented.
#define JP2K_ROMMRGB_SPACE   21
 As defined in PIMA 7666.
#define JP2K_YPbPr60_SPACE   22
 Opponent colour space used by HDTV systems.
#define JP2K_YPbPr50_SPACE   23
 The standard indicates that this space has a slightly different opponent colour transform than JP2K_YPbPr60_SPACE; however, I have been unable to confirm this.
#define JP2K_esYCC_SPACE   24
 This is an extended form of sYCC, whose definition may be found in Annex B of PIMA 7667. Although the basic principles are similar to those associated with esRGB, this colour space is NOT obtained simply by applying the irreversible colour transform to the esRGB coordinates.
#define JP2K_iccLUM_SPACE   100
 Mono space described by restricted ICC profile.
#define JP2K_iccRGB_SPACE   101
 3-colour space given by restricted ICC profile
#define JP2K_iccANY_SPACE   102
 Unrestricted ICC profile (any number of colours).
#define JP2K_vendor_SPACE   200
 Vendor-defined colour space.
#define JP2K_CIE_DAY   ((((DWORD) 'C')<<24) + (((DWORD) 'T')<<16))
#define JP2K_CIE_D50   ((DWORD) 0x00443530)
#define JP2K_CIE_D65   ((DWORD) 0x00443635)
#define JP2K_CIE_D75   ((DWORD) 0x00443735)
#define JP2K_CIE_SA   ((DWORD) 0x00005341)
#define JP2K_CIE_SC   ((DWORD) 0x00005343)
#define JP2K_CIE_F2   ((DWORD) 0x00004632)
#define JP2K_CIE_F7   ((DWORD) 0x00004637)
#define JP2K_CIE_F11   ((DWORD) 0x00463131)

Detailed Description

JP2K_Old_xxx are old indexed value, JP2K_xxx are new direct values.

JP2K_Old_xxx are defined on bits[14..0], bit[15] must be set to 0

JP2K_xxx are defined on bits[14..0], bit[15] must be set to 1

Define Documentation

#define JP2K_Old_sLUM_SPACE   0
 

The standard luminance space (same gamma as sRGB).

#define JP2K_Old_sRGB_SPACE   1
 

The standard RGB space.

#define JP2K_Old_sYCC_SPACE   2
 

YCC derivative of sRGB.

#define JP2K_Old_iccLUM_SPACE   3
 

Monochrome space described by an embedded ICC profile.

#define JP2K_Old_iccRGB_SPACE   4
 

3-colour space described by an embedded ICC profile

#define JP2K_bilevel1_SPACE   0
 

used to indicate a bi-level image in which 0 means white and 1 means black.

#define JP2K_YCbCr1_SPACE   1
 

Commonly used for data that originated from a video signal.

  • The primaries are based on ITU-R Rec. BT709-4, having chromaticities (Rx,Ry)=(0.640,0.330), (Gx,Gy)=(0.300,0.600) and (Bx,By)=(0.150,0.060), with a whitepoint of (Wx,Wy)=(0.3127,0.3290) under CIE illuminant D65, and a gamma function with parameters gamma=1/0.45 and beta=0.099.
  • The opponent transform which maps gamma-corrected RGB to Y1, Cb1 and Cr1 is identical to the ICT (irreversible colour transform) defined by JPEG2000 Part 1, except that the Y1, Cb1 and Cr1 channels have been scaled so as to occupy less than the full nominal dynamic range. In particular, writing Y, Cb and Cr for the values which would be produced by the ICT, with Y in the range 0 to 1, and Cb and Cr in the range -0.5 to +0.5, we have Y1 = (219*Y'+16) / 256; Cb1 = Cb' * 224/256; and Cr1 = Cr' * 224/256. As an example, to express Y1, Cb1 and Cr1 as 8-bit unsigned numbers, the normalized quantities are multiplied by 256, and the chrominance quantities are then offset by 128.

#define JP2K_YCbCr2_SPACE   3
 

Commmonly used for data that originated as RGB, but has been converted to luminance and chrominance samples.

  • The primaries are based on ITU-R Rec. BT601-5, having chromaticities (Rx,Ry)=(0.630,0.340), (Gx,Gy)=(0.310,0.595) and (Bx,By)=(0.155,0.070), with a whitepoint of (Wx,Wy)=(0.3127,0.3290) under CIE illuminant D65, and with a gamma function governed by parameters gamma=1/0.45 and beta=0.099. Note that this is the same gamma as the colour space above, but with different RGB primaries.
  • The opponent colour transform used to map RGB to Y2, Cb2 and Cr2 values is identical to the ICT (irreversible colour transform) defined by JPEG2000 Part 1, without any additional scaling.

#define JP2K_YCbCr3_SPACE   4
 

Commonly used for data that originated from a video signal.

  • The primaries are based on ITU-R Rec. BT601-5, having exactly the same chromaticities, whitepoint and gamma as JP2K_YCbCr2_SPACE.
  • The opponent colour transform used to map RGB to Y3, Cb3 and Cr3 values is identical to the ICT (irreversible colour transform) defined by JPEG2000 Part 1, except that it includes the additional scaling factors described above for the JP2K_YCbCr1_SPACE.

#define JP2K_PhotoYCC_SPACE   9
 

This is the colour encoding method used in the Photo CD system.

  • The primaries are based on ITU-R Rec. BT.709, having exactly the same chromaticities, whitepoint and gamma as JP2K_YCbCr1_SPACE.
  • The opponent colour transform used to map RGB to Y, C1 and C2 values is identical to the ICT (irreversible colour transform) defined by JPEG2000 Part 1, but the coefficients are scaled and offset in an unusual manner. In particular, treating the Y component as an unsigned quantity in the range 0 to 1, and the Cb and Cr components as signed quantities in the range -0.5 to +0.5, the Y component is scaled by 0.7133, while the Cb and Cr components are both scaled and offset. The Cb component is scaled by 0.7711 and then offset by the addition of +0.1094, while the Cr component is scaled by 0.7428 and offset by the addition of +0.0352.

#define JP2K_CMY_SPACE   11
 

Cyan-Magenta-Yellow colour space suitable for printing.

A

Not formally defined device dependent. Values of 0 mean zero ink coverage, while the maximum nominal value corresponds to an ink coverage of 100% for the relevant colourant.

#define JP2K_CMYK_SPACE   12
 

Same as JP2K_CMY_SPACE but with an extra channel for black ink.

#define JP2K_YCCK_SPACE   13
 

This is an opponent representation for the JP2K_CMYK_SPACE.

The first 3 components (C, M and Y) are first complemented to form pseudo-RGB coordinates. Specifically, if C, M and Y are regarded as numbers in the range 0 to 1, complementing them forms R=1-C, G=1-M and B=1-Y. The ICT (irreversible colour transform) defined by JPEG2000 Part 1 code-streams is then applied to the complemented colour channels to form luminance and chrominance channels. The black (K) channel is unaffected by the above transformations.

#define JP2K_CIELab_SPACE   14
 

This is the CIE Lab colour space.

If you choose to use this form of the init' function, you will get the default Lab parameters, as described in the documentation provided with the second form of the init' function.

#define JP2K_bilevel2_SPACE   15
 

Same as JP2K_bilevel1_SPACE, exept that a value of 1 means white and 0 means black.

#define JP2K_sRGB_SPACE   16
 

This is the standard RGB space used by JP2 files.

Try to use this colour space if you have a choice, since that will encourage JP2-compatibility.

  • The primaries are those of ITU-R Rec. BT709, having the same chromaticities and whitepoint as JP2K_YCbCr1_SPACE, except that the gamma function uses parameters gamma=2.4 and beta=0.055, which are different from those defined by Rec. BT709. These are defined in IEC 61966-2-1 (sRGB).

#define JP2K_sLUM_SPACE   17
 

This is the standard luminance space used by JP2 files.

Try to use this space if you have a choice of luminance specifications, since that will encourage JP2-compatibility.

  • Uses a gamma function with gamma=2.4 and beta=0.055, which is the same as that defined by IEC 61966-2-1 for the sRGB space.

#define JP2K_sYCC_SPACE   18
 

This is the standard opponent colour space used by JP2 files.

Try to use this space if you have a choice of opponent colour specifications, since that will encourage JP2-compatibility.

  • The primaries are those of ITU-R Rec. BT709, except that the gamma function uses parameters gamma=2.4 and beta=0.055, exactly as for JP2K_sRGB_SPACE.
  • The opponent colour transform used to map RGB to Y, C1 and C2 values is identical to the ICT (irreversible colour transform) defined by JPEG2000 Part 1, without any additional scaling.

#define JP2K_CIEJab_SPACE   19
 

This colour space is based on CIECAM97s (CIE Publication 131).

If you choose to use this form of the init' function, you will get the default Jab parameters, as described in the documentation provided with the second form of the init' function.

#define JP2K_esRGB_SPACE   20
 

This is an extended form of the sRGB colour space, designed to allow colours with a larger gamut than that of sRGB to be represented.

The specification may be found in PIMA 7667; however, the extension is simple enough to understand:

  • The underlying primaries and gamma function are the same as those of JP2K_sRGB_SPACE (i.e., Rec. 709 primaries with a different gamma of 2.4 and beta=0.055). However, negative and abnormally large values for the linear R, G and B primary intensities are considered legal. The gamma function processes negative channel values by processing their magnitude in the usual fashion and passing the sign across the gamma function that is, the gamma function is defined to be and odd (symmetric) function of its input.
  • Regarding the gamma corrected channel intensities as unsigned quantities with a nominal range of 0 to 1 (remember that negative and abnormally large values are allowed, though), these values are scaled by 0.5 and then offset by adding exactly 0.375.

#define JP2K_ROMMRGB_SPACE   21
 

As defined in PIMA 7666.

#define JP2K_YPbPr60_SPACE   22
 

Opponent colour space used by HDTV systems.

  • The primaries have chromaticities (0.67,0.33), (0.21,0.71) and (0.15,0.06), with a D65 whitepoint (0.3127,0.3290), and gamma=1/0.45, with beta=0.099.
  • The opponent colour transform used to map RGB to Y, Pb and Pr values yields: Y'=0.2122*R+0.7013*G+0.0865*B; Pb'=-0.1162*R-0.3838*G+0.5*B; Pr'=0.5*R-0.4451*G-0.0549*B, where Y, Pb and Pr are obtained by scaling and offsetting Y', Pb' and Pr'. Exactly as for the JP2K_YCbCr1_SPACE, if R, G and B lie in the nominal range 0 to 1, so that Y' has the same range and Pb' and Pr' lie in the range -0.5 to +0.5, the actual opponent channels are scaled such that Y = (219*Y'+16) / 256, Pb = Pb' * 224/256 and Pr = Pr' * 224/256. This ensures that when these quantities are represented as unsigned 8-bit numbers, they will lie in the range 16 to 235 (for Y) and 16 to 240 (for Pb and Pr).

#define JP2K_YPbPr50_SPACE   23
 

The standard indicates that this space has a slightly different opponent colour transform than JP2K_YPbPr60_SPACE; however, I have been unable to confirm this.

All information I have been able to lay my hands on concerning YPbPr provides the definition given above; it may be that the text in the standard was borrowed from the SPIFF documentation, and that this had become outdated.

#define JP2K_esYCC_SPACE   24
 

This is an extended form of sYCC, whose definition may be found in Annex B of PIMA 7667. Although the basic principles are similar to those associated with esRGB, this colour space is NOT obtained simply by applying the irreversible colour transform to the esRGB coordinates.

Instead, the following procedure is used to obtain esYCC coordinates.

  • The colour space is based on the same primaries and gamma function as sRGB and esRGB (i.e., Rec. 709 primaries, with the different gamma of 2.4, with beta=0.055). As with esRGB, the linear primary RGB coordinates are allowed to take on negative and abnormally large values.
  • The opponent transform is obtained by first applying the ICT (irreversible colour transform) defined by JPEG2000 Part 1 to the above-mentioned primaries, and then scaling the Cb and Cr coordinates by 0.5. Once this is done, negative or abnormally large values for the luminance coordinate are clipped so that the extended gamut information is retained only in the chrominance channels.

#define JP2K_iccLUM_SPACE   100
 

Mono space described by restricted ICC profile.

#define JP2K_iccRGB_SPACE   101
 

3-colour space given by restricted ICC profile

#define JP2K_iccANY_SPACE   102
 

Unrestricted ICC profile (any number of colours).

#define JP2K_vendor_SPACE   200
 

Vendor-defined colour space.

#define JP2K_CIE_DAY   ((((DWORD) 'C')<<24) + (((DWORD) 'T')<<16))
 

#define JP2K_CIE_D50   ((DWORD) 0x00443530)
 

#define JP2K_CIE_D65   ((DWORD) 0x00443635)
 

#define JP2K_CIE_D75   ((DWORD) 0x00443735)
 

#define JP2K_CIE_SA   ((DWORD) 0x00005341)
 

#define JP2K_CIE_SC   ((DWORD) 0x00005343)
 

#define JP2K_CIE_F2   ((DWORD) 0x00004632)
 

#define JP2K_CIE_F7   ((DWORD) 0x00004637)
 

#define JP2K_CIE_F11   ((DWORD) 0x00463131)
 


   

© Morgan Multimedia 1990-2005