1Name 2 3 EXT_cmyka 4 5Name Strings 6 7 GL_EXT_cmyka 8 9Version 10 11 $Date: 1997/02/26 03:36:26 $ $Revision: 1.17 $ 12 13Number 14 15 18 16 17Dependencies 18 19 EXT_abgr affects the definition of this extension 20 EXT_texture3D affects the definition of this extension 21 EXT_subtexture affects the definition of this extension 22 EXT_histogram affects the definition of this extension 23 EXT_convolution affects the definition of this extension 24 SGI_color_table affects the definition of this extension 25 SGIS_texture4D affects the definition of this extension 26 27Overview 28 29 This extension provides a simple method for OpenGL to read and store 30 images whose pixels have CMYK or CMYKA formats. The algorithms used to 31 convert to RGBA from CMYKA and to convert back from RGBA to CMYKA are of 32 the "black-box" nature, meaning that the application has little control 33 over how the conversion is done. Also, this black-box mechanism is 34 available only for transfers to or from memory, not for internal copies 35 of pixel data (such as invoked by CopyPixels, CopyTexImage1D, etc.) 36 However, the defined mechanism nicely handles 5-component CMYKA images, 37 and it is very easy to use. 38 39 A more configurable and potentially higher quality color conversion can 40 be implemented using the color tables, the color matrix, and possibly 3D 41 and 4D texture lookup. Such a color conversion also applies to copied 42 pixel data. 43 44New Procedures and Functions 45 46 None 47 48New Tokens 49 50 Accepted by the <format> parameter of DrawPixels, ReadPixels, 51 TexImage1D, TexImage2D, TexImage3DEXT, TexImage4DSGIS, TexSubImage1DEXT, 52 TexSubImage2DEXT, TexSubImage3DEXT, TexSubImage4DSGIS, GetTexImage, 53 ColorTableSGI, GetColorTableSGI, ConvolutionFilter1DEXT, 54 ConvolutionFilter2DEXT, ConvolutionFilter3DEXT, GetConvolutionFilterEXT, 55 SeparableFilter2DEXT, SeparableFilter3DEXT, GetSeparableFilterEXT, 56 GetHistogramEXT, and GetMinmaxEXT: 57 58 CMYK_EXT 0x800C 59 CMYKA_EXT 0x800D 60 61 Accepted by the <target> parameter of Hint, and by the <pname> 62 parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: 63 64 PACK_CMYK_HINT_EXT 0x800E 65 UNPACK_CMYK_HINT_EXT 0x800F 66 67Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 68 69 None 70 71Additions to Chapter 3 of the 1.0 Specification (Rasterization) 72 73 Two entries are added to table 3.5 (DrawPixels and ReadPixels formats). 74 The new table is: 75 76 Target 77 Name Type Elements Buffer 78 ---- ---- -------- ------ 79 COLOR_INDEX Index Color Index Color 80 STENCIL_INDEX Index Stencil value Stencil 81 DEPTH_COMPONENT Component Depth value Depth 82 RED Component R Color 83 GREEN Component G Color 84 BLUE Component B Color 85 ALPHA Component A Color 86 RGB Component R, G, B Color 87 RGBA Component R, G, B, A Color 88 LUMINANCE Component Luminance value Color 89 LUMINANCE_ALPHA Component Luminance value, A Color 90 ABGR_EXT Component A, B, G, R Color 91 CMYK_EXT Component Cyan value, Color 92 Magenta value, 93 Yellow value, 94 Black value 95 CMYKA_EXT Component Cyan value, Color 96 Magenta value, 97 Yellow value, 98 Black value, A 99 100 Table 3.5: DrawPixels and ReadPixels formats. The third column 101 gives a description of and the number and order of elements in a 102 group. 103 104 The new formats CMYK_EXT and CMYKA_EXT are added to the discussion of 105 Conversion to RGB. If the format is either of these two values, then 106 the cyan, magenta, yellow, and black values in each group are converted 107 to R, G, and B values using an undefined algorithm. The value of 108 UNPACK_CMYK_HINT_EXT determines whether the implementation uses its 109 fastest, nicest, or favorite algorithm to accomplish this conversion. 110 The unpacking conversion hint is specified by calling Hint with 111 parameter <target> set to UNPACK_CMYK_HINT_EXT, and parameter <mode> set 112 to FASTEST, NICEST, or DONT_CARE. If the format is CMYKA_EXT, the alpha 113 value is copied directly to A. 114 115Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 116and the Framebuffer) 117 118 The new formats are added to the discussion of Obtaining Pixels from the 119 Framebuffer. It should read "If the <format> is LUMINANCE, 120 LUMINANCE_ALPHA, CMYK_EXT, or CMYKA_EXT, then R, G, B, and A values are 121 obtained. If the <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, 122 ABGR_EXT, LUMINANCE, LUMINANCE_ALPHA, CMYK_EXT, or CMYKA_EXT, and the GL 123 is in color index mode, then the color index is obtained." 124 125 The new formats are added to the discussion of Index Lookup. It should 126 read "If <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, 127 ABGR_EXT, LUMINANCE, LUMINANCE_ALPHA, CMYK_EXT, or CMYKA_EXT, then the 128 index is used to reference 4 tables of color components: 129 PIXEL_MAP_I_TO_R, PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and 130 PIXEL_MAP_I_TO_A." 131 132 A new section, "Conversion to CMYK," is added immediately following the 133 section "Conversion to L." It reads: 134 135 This step applies only to RGBA component groups, and only if the 136 <format> is either CMYK_EXT or CMYKA_EXT. Values for cyan, magenta, 137 yellow, and black are computed from the R, G, and B values of the 138 pixel group using an undefined algorithm. These cyan, magenta, 139 yellow, and black values replace the R, G, and B values in the 140 group. The value of PACK_CMYK_HINT_EXT determines whether the 141 implementation uses its fastest, nicest, or favorite algorithm to 142 accomplish this conversion. The packing conversion hint is 143 specified by calling Hint with parameter <target> set to 144 PACK_CMYK_HINT_EXT, and parameter <mode> set to FASTEST, NICEST, or 145 DONT_CARE. 146 147Additions to Chapter 5 of the 1.0 Specification (Special Functions) 148 149 None 150 151Additions to Chapter 6 of the 1.0 Specification (State and State Requests) 152 153 Although PACK_CMYK_HINT_EXT and UNPACK_CMYK_HINT_EXT are modified using 154 the Hint interface, they are not included in the hint attribute set. 155 Rather, they are part of pixel storage state, meaning that they are not 156 pushed and popped by PushAttributes and PopAttributes, and that they are 157 client state rather than server state. Also, like all other pixel 158 storage parameters, the CMYK hint modes in effect when a pixel command 159 (such as DrawPixels) is placed in a display list control the 160 interpretation of memory data. The CMYK hints in effect when a display 161 list is executed are not significant. 162 163Additions to the GLX Specification 164 165 None 166 167GLX Protocol 168 169 None 170 171Dependencies on EXT_abgr 172 173 If EXT_abgr is not implemented, then references to ABGR_EXT in this 174 specification are void. 175 176Dependencies on EXT_texture3D 177 178 If EXT_texture3D is not implemented, then references to TexImage3DEXT, 179 TexSubImage3DEXT, ConvolutionFilter3DEXT, and SeparableFilter3DEXT in 180 this specification are void. 181 182Dependencies on EXT_subtexture 183 184 If EXT_subtexture is not implemented, then references to 185 TexSubImage1DEXT, TexSubImage2DEXT, TexSubImage3DEXT, and 186 TexSubImage4DSGIS in this specification are void. 187 188Dependencies on EXT_histogram 189 190 If EXT_histogram is not implemented, then references to GetHistogramEXT 191 and GetMinmaxEXT in this extension are void. 192 193Dependencies on EXT_convolution 194 195 If EXT_convolution is not implemented, then references to 196 ConvolutionFilter1DEXT, ConvolutionFilter2DEXT, ConvolutionFilter3DEXT, 197 GetConvolutionFilterEXT, SeparableFilter2DEXT, SeparableFilter3DEXT, and 198 GetSeparableFilterEXT in this extension are void. 199 200Dependencies on SGI_color_table 201 202 If SGI_color_table is not implemented, then references to ColorTableSGI 203 and GetColorTableSGI in this extension are void. 204 205Dependencies on SGIS_texture4D 206 207 If SGIS_texture4D is not implemented, then references to TexImage4DSGIS 208 and TexSubImage4DSGIS in this extension are void. 209 210Errors 211 212 None 213 214New State 215 216 Get Value Get Command Type Initial Value Attrib 217 --------- ----------- ---- ------------- ------ 218 PACK_CMYK_HINT_EXT GetIntegerv Z3 DONT_CARE client 219 UNPACK_CMYK_HINT_EXT GetIntegerv Z3 DONT_CARE client 220 221New Implementation Dependent State 222 223 None 224