| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>Calibration Format File (.cal)</title> |
| 5 | <meta http-equiv="content-type" content="text/html; |
| 6 | charset=windows-1252"> |
| 7 | <meta name="author" content="Graeme Gill"> |
| 8 | </head> |
| 9 | <body> |
| 10 | <h2>Description of the .cal format</h2> |
| 11 | Device calibration information. This is ASCII text, <a |
| 12 | href="File_Formats.html#CGATS">CGATS</a>, Argyll specific format, |
| 13 | used to hold a description of device setup information that when |
| 14 | used to transform device values fed into it, brings it to a desired |
| 15 | calibration state. Calibration files are created by <a |
| 16 | href="synthcal.html">synthcal</a>, <a href="dispcal.html">dispcal</a> |
| 17 | and <a href="printcal.html">printcal</a>.<br> |
| 18 | |
| 19 | |
| 20 | <br> |
| 21 | While fully compatible with the CGATS.5 Data Exchange Format, the |
| 22 | particular required keywords and fields are unique to Argyll, hence |
| 23 | an Argyll specific file identifier <span style="font-weight: bold;">CAL</span> |
| 24 | is used to avoid confusion with standard ANSI or CGATS files.<br> |
| 25 | <br> |
| 26 | The <span style="font-weight: bold;">.cal</span> format changes |
| 27 | from time to time with new releases, to add new functionality, but |
| 28 | generally retains backwards compatibility. Note that in the |
| 29 | description below, the word "may" indicates an optional component, |
| 30 | while the word "shall" indicates a necessary component.<br> |
| 31 | <br> |
| 32 | Generally a .cal file contains only one table, the table containing |
| 33 | the setup information. Any subsequent tables are for internal use by |
| 34 | ArgyllCMS tools, and shouldn't be relied on to remain consistent in |
| 35 | their purpose or details.<br> |
| 36 | <br> |
| 37 | <br> |
| 38 | The table contains the following:<br> |
| 39 | <br> |
| 40 | The file identifier (First 7 characters) shall be <span |
| 41 | style="font-weight: bold;">CAL</span>.<br> |
| 42 | |
| 43 | |
| 44 | <br> |
| 45 | A <span style="font-weight: bold;">#</span> character introduces a |
| 46 | comment.<br> |
| 47 | <br> |
| 48 | <span style="font-weight: bold;"><span style="font-weight: bold;"><span |
| 49 | style="font-weight: bold;"></span></span></span>There may be <span |
| 50 | style="font-weight: bold;">DESCRIPTOR</span>, <span |
| 51 | style="font-weight: bold;">ORIGINATOR</span>, or <span |
| 52 | style="font-weight: bold;">CREATED</span> keywords and values (as |
| 53 | per CGATS).<br> |
| 54 | <br> |
| 55 | There shall be a <span style="font-weight: bold;">DEVICE_CLASS</span> |
| 56 | keyword that has a value of <span style="font-weight: bold;">"OUTPUT</span>", |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | "<span style="font-weight: bold;">DISPLAY</span>" or <span |
| 65 | style="font-weight: bold;">"INPUT"</span>.<br> |
| 66 | This indicates what type of device the calibration information is |
| 67 | suitable for.<br> |
| 68 | |
| 69 | |
| 70 | <br> |
| 71 | A <span style="font-weight: bold;">"DISPLAY"</span> type device may |
| 72 | have a <span style="font-weight: bold;">VIDEO_LUT_CALIBRATION_POSSIBLE |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | </span>keyword that must have a value of "<span style="font-weight: |
| 81 | bold;">NO</span>" or "<span style="font-weight: bold;">YES</span>", |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | to indicate whether the display has the ability to be calibrated by |
| 89 | loading VideoLUT values.<br> |
| 90 | <br> |
| 91 | A <span style="font-weight: bold;">"DISPLAY"</span> type device may |
| 92 | have a <span style="font-weight: bold;">TV_OUTPUT_ENCODING </span>keyword |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | that must have a value of "<span style="font-weight: bold;">NO</span>" |
| 100 | or "<span style="font-weight: bold;">YES</span>", to indicate |
| 101 | whether the calibration was created withing the video (16-235)/255 |
| 102 | compressed range of device value. This is used to signal to a |
| 103 | VideoLUT loader whether calibration values should be converted to |
| 104 | video encoded range when loaded into hardware. The calibration |
| 105 | values stored in the .cal file are never video encoded themselves, |
| 106 | i.e. 0.0 is always device minimum, and 1.0 is always device maximum.<br> |
| 107 | <br> |
| 108 | There shall be a keyword <span style="font-weight: bold;">COLOR_REP</span> |
| 109 | that has a value that indicates what colorspaces of the device |
| 110 | values. The colorspaces shall be encoded with one or two |
| 111 | letters per component. The device spaces shall use the following |
| 112 | letter encoding:<br> |
| 113 | <br> |
| 114 | <span style="font-weight: bold;"><span style="font-weight: bold;"></span></span> |
| 115 | Cyan |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | C<br> |
| 133 | Magenta |
| 134 | M<br> |
| 135 | Yellow |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | Y<br> |
| 145 | Black |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | K<br> |
| 155 | Orange |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | O<br> |
| 165 | Red |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | R<br> |
| 175 | Green |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | G<br> |
| 185 | Blue |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | B<br> |
| 195 | White |
| 196 | |
| 197 | W<br> |
| 198 | Light Cyan |
| 199 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | c<br> |
| 208 | Light |
| 209 | Magenta |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | m<br> |
| 218 | Light |
| 219 | Yellow |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | y<br> |
| 228 | Light |
| 229 | Black |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | k<br> |
| 238 | Medium Cyan |
| 239 | 2c<br> |
| 240 | Medium Magenta |
| 241 | 2m<br> |
| 242 | Medium Yellow |
| 243 | 2y<br> |
| 244 | Medium Black |
| 245 | 2k<br> |
| 246 | Light Light Black 1k<br> |
| 247 | <br> |
| 248 | There may be an a prefix <span style="font-weight: bold;">i</span> |
| 249 | preceding the device space letter encoding, indicating that although |
| 250 | the space appears to be an additive space, it is in fact a |
| 251 | subtractive device.<br> |
| 252 | <br> |
| 253 | Typical values might be: "<span style="font-weight: bold;">RGB</span><span |
| 254 | style="font-weight: bold;"></span>" for an RGB display, "<span |
| 255 | style="font-weight: bold;">iRGB</span><span style="font-weight: |
| 256 | bold;"></span>" for an RGB printer, "<span style="font-weight: |
| 257 | bold;">CMYK</span>" for a printer, "<span style="font-weight: |
| 258 | bold;">RGB"</span> for an RGB scanner.<br> |
| 259 | <br> |
| 260 | |
| 261 | |
| 262 | <br> |
| 263 | The <span style="font-weight: bold;">NUMBER_OF_FIELDS</span> |
| 264 | keyword shall have a value that indicates the number of fields in |
| 265 | each data set, e.g. <span style="font-weight: bold;">4</span> (as |
| 266 | per CGATS).<br> |
| 267 | <br> |
| 268 | The start of the declaration of the fields shall be marked by the <span |
| 269 | style="font-weight: bold;">BEGIN_DATA_FORMAT</span> keyword (as |
| 270 | per CGATS).<br> |
| 271 | <br> |
| 272 | The fields shall use the standard CGATS pattern of the full |
| 273 | colorspace identified followed by the individual colorant |
| 274 | identifier. There shall be an initial input index value identified |
| 275 | by the letter <span style="font-weight: bold;">I</span>.<br> |
| 276 | <br> |
| 277 | For an RGB device, the following fields would be used to define the |
| 278 | calibration transformation:<br> |
| 279 | <br> |
| 280 | <span style="font-weight: bold;">RGB_I</span> |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 | The device value input value between 0.0 and 1.0.<br> |
| 290 | <span style="font-weight: bold;">RGB_R</span> |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | The Red device value output value between 0.0 and 1.0.<br> |
| 300 | <span style="font-weight: bold;">RGB_G</span> |
| 301 | The Green device value output value between 0.0 |
| 302 | and 1.0.<br> |
| 303 | <span style="font-weight: bold;">RGB_B</span> |
| 304 | The Blue device value output value between 0.0 |
| 305 | and 1.0.<br> |
| 306 | <br> |
| 307 | The corresponding field names for a CMYK device would be <span |
| 308 | style="font-weight: bold;">CMYK_I</span>, <span |
| 309 | style="font-weight: bold;">CMYK_C</span>, <span |
| 310 | style="font-weight: bold;">CMYK_M</span>, <span |
| 311 | style="font-weight: bold;">CMYK_Y</span> and <span |
| 312 | style="font-weight: bold;">CMYK_K</span>, etc.<br> |
| 313 | <br> |
| 314 | The definition of the fields shall be terminated by the <span |
| 315 | style="font-weight: bold;">END_DATA_FORMAT</span> keyword (as per |
| 316 | CGATS).<br> |
| 317 | <br> |
| 318 | The <span style="font-weight: bold;">NUMBER_OF_SETS</span> keyword |
| 319 | shall have a value that indicates the number of sets of data, e.g. <span |
| 320 | style="font-weight: bold;">256</span> (as per CGATS).<br> |
| 321 | <br> |
| 322 | The start of the values of the data sets shall be marked by the <span |
| 323 | style="font-weight: bold;">BEGIN_DATA</span> keyword (as per |
| 324 | CGATS).<br> |
| 325 | <br> |
| 326 | Each set of data shall be on one line, and shall be separated by |
| 327 | white space. All values shall be normalized to lie between 0.0 and |
| 328 | 1.0.<br> |
| 329 | <br> |
| 330 | The end of the values of the data sets shall be marked by the <span |
| 331 | style="font-weight: bold;">END_DATA</span> keyword (as per CGATS).<br> |
| 332 | |
| 333 | |
| 334 | <br> |
| 335 | There may then be device type specific extra tables that hold target |
| 336 | or device behavior information. These will be specific to the tool |
| 337 | that creates that particular type of calibration.<br> |
| 338 | <br> |
| 339 | Generally any other keywords and values will be ignored.<br> |
| 340 | <br> |
| 341 | <br> |
| 342 | </body> |
| 343 | </html> |