dng_tag_values.h revision ffee7a66caebb7027d7591405e8494e3c9e8517e
1/*****************************************************************************/ 2// Copyright 2006-2007 Adobe Systems Incorporated 3// All Rights Reserved. 4// 5// NOTICE: Adobe permits you to use, modify, and distribute this file in 6// accordance with the terms of the Adobe license agreement accompanying it. 7/*****************************************************************************/ 8 9/* $Id: //mondo/dng_sdk_1_4/dng_sdk/source/dng_tag_values.h#1 $ */ 10/* $DateTime: 2012/05/30 13:28:51 $ */ 11/* $Change: 832332 $ */ 12/* $Author: tknoll $ */ 13 14/*****************************************************************************/ 15 16#ifndef __dng_tag_values__ 17#define __dng_tag_values__ 18 19/*****************************************************************************/ 20 21#include "dng_flags.h" 22 23/*****************************************************************************/ 24 25// Values for NewSubFileType tag. 26 27enum 28 { 29 30 // The main image data. 31 32 sfMainImage = 0, 33 34 // Preview image for the primary settings. 35 36 sfPreviewImage = 1, 37 38 // Transparency mask 39 40 sfTransparencyMask = 4, 41 42 // Preview Transparency mask 43 44 sfPreviewMask = sfPreviewImage + sfTransparencyMask, 45 46 // Preview image for non-primary settings. 47 48 sfAltPreviewImage = 0x10001 49 50 }; 51 52/******************************************************************************/ 53 54// Values for PhotometricInterpretation tag. 55 56enum 57 { 58 59 piWhiteIsZero = 0, 60 piBlackIsZero = 1, 61 piRGB = 2, 62 piRGBPalette = 3, 63 piTransparencyMask = 4, 64 piCMYK = 5, 65 piYCbCr = 6, 66 piCIELab = 8, 67 piICCLab = 9, 68 69 piCFA = 32803, // TIFF-EP spec 70 71 piLinearRaw = 34892 72 73 }; 74 75/******************************************************************************/ 76 77// Values for PlanarConfiguration tag. 78 79enum 80 { 81 82 pcInterleaved = 1, 83 pcPlanar = 2, 84 85 pcRowInterleaved = 100000 // Internal use only 86 87 }; 88 89/******************************************************************************/ 90 91// Values for ExtraSamples tag. 92 93enum 94 { 95 96 esUnspecified = 0, 97 esAssociatedAlpha = 1, 98 esUnassociatedAlpha = 2 99 100 }; 101 102/******************************************************************************/ 103 104// Values for SampleFormat tag. 105 106enum 107 { 108 109 sfUnsignedInteger = 1, 110 sfSignedInteger = 2, 111 sfFloatingPoint = 3, 112 sfUndefined = 4 113 114 }; 115 116/******************************************************************************/ 117 118// Values for Compression tag. 119 120enum 121 { 122 123 ccUncompressed = 1, 124 ccLZW = 5, 125 ccOldJPEG = 6, 126 ccJPEG = 7, 127 ccDeflate = 8, 128 ccPackBits = 32773, 129 ccOldDeflate = 32946, 130 131 // Used in DNG files in places that allow lossless JPEG. 132 133 ccLossyJPEG = 34892 134 135 }; 136 137/******************************************************************************/ 138 139// Values for Predictor tag. 140 141enum 142 { 143 144 cpNullPredictor = 1, 145 cpHorizontalDifference = 2, 146 cpFloatingPoint = 3, 147 148 cpHorizontalDifferenceX2 = 34892, 149 cpHorizontalDifferenceX4 = 34893, 150 cpFloatingPointX2 = 34894, 151 cpFloatingPointX4 = 34895 152 153 }; 154 155/******************************************************************************/ 156 157// Values for ResolutionUnit tag. 158 159enum 160 { 161 162 ruNone = 1, 163 ruInch = 2, 164 ruCM = 3, 165 ruMM = 4, 166 ruMicroM = 5 167 168 }; 169 170/******************************************************************************/ 171 172// Values for LightSource tag. 173 174enum 175 { 176 177 lsUnknown = 0, 178 179 lsDaylight = 1, 180 lsFluorescent = 2, 181 lsTungsten = 3, 182 lsFlash = 4, 183 lsFineWeather = 9, 184 lsCloudyWeather = 10, 185 lsShade = 11, 186 lsDaylightFluorescent = 12, // D 5700 - 7100K 187 lsDayWhiteFluorescent = 13, // N 4600 - 5500K 188 lsCoolWhiteFluorescent = 14, // W 3800 - 4500K 189 lsWhiteFluorescent = 15, // WW 3250 - 3800K 190 lsWarmWhiteFluorescent = 16, // L 2600 - 3250K 191 lsStandardLightA = 17, 192 lsStandardLightB = 18, 193 lsStandardLightC = 19, 194 lsD55 = 20, 195 lsD65 = 21, 196 lsD75 = 22, 197 lsD50 = 23, 198 lsISOStudioTungsten = 24, 199 200 lsOther = 255 201 202 }; 203 204/******************************************************************************/ 205 206// Values for ExposureProgram tag. 207 208enum 209 { 210 211 epUnidentified = 0, 212 epManual = 1, 213 epProgramNormal = 2, 214 epAperturePriority = 3, 215 epShutterPriority = 4, 216 epProgramCreative = 5, 217 epProgramAction = 6, 218 epPortraitMode = 7, 219 epLandscapeMode = 8 220 221 }; 222 223/******************************************************************************/ 224 225// Values for MeteringMode tag. 226 227enum 228 { 229 230 mmUnidentified = 0, 231 mmAverage = 1, 232 mmCenterWeightedAverage = 2, 233 mmSpot = 3, 234 mmMultiSpot = 4, 235 mmPattern = 5, 236 mmPartial = 6, 237 238 mmOther = 255 239 240 }; 241 242/******************************************************************************/ 243 244// CFA color codes from the TIFF/EP specification. 245 246enum ColorKeyCode 247 { 248 249 colorKeyRed = 0, 250 colorKeyGreen = 1, 251 colorKeyBlue = 2, 252 colorKeyCyan = 3, 253 colorKeyMagenta = 4, 254 colorKeyYellow = 5, 255 colorKeyWhite = 6, 256 257 colorKeyMaxEnum = 0xFF 258 259 }; 260 261/*****************************************************************************/ 262 263// Values for the SensitivityType tag. 264 265enum 266 { 267 268 stUnknown = 0, 269 270 stStandardOutputSensitivity = 1, 271 stRecommendedExposureIndex = 2, 272 stISOSpeed = 3, 273 stSOSandREI = 4, 274 stSOSandISOSpeed = 5, 275 stREIandISOSpeed = 6, 276 stSOSandREIandISOSpeed = 7 277 278 }; 279 280/*****************************************************************************/ 281 282// Values for the ColorimetricReference tag. It specifies the colorimetric 283// reference used for images with PhotometricInterpretation values of CFA 284// or LinearRaw. 285 286enum 287 { 288 289 // Scene referred (default): 290 291 crSceneReferred = 0, 292 293 // Output referred using the parameters of the ICC profile PCS. 294 295 crICCProfilePCS = 1 296 297 }; 298 299/*****************************************************************************/ 300 301// Values for the ProfileEmbedPolicy tag. 302 303enum 304 { 305 306 // Freely embedable and copyable into installations that encounter this 307 // profile, so long as the profile is only used to process DNG files. 308 309 pepAllowCopying = 0, 310 311 // Can be embeded in a DNG for portable processing, but cannot be used 312 // to process other files that the profile is not embedded in. 313 314 pepEmbedIfUsed = 1, 315 316 // Can only be used if installed on the machine processing the file. 317 // Note that this only applies to stand-alone profiles. Profiles that 318 // are already embedded inside a DNG file allowed to remain embedded 319 // in that DNG, even if the DNG is resaved. 320 321 pepEmbedNever = 2, 322 323 // No restricts on profile use or embedding. 324 325 pepNoRestrictions = 3 326 327 }; 328 329/*****************************************************************************/ 330 331// Values for the ProfileHueSatMapEncoding and ProfileLookTableEncoding tags. 332 333enum 334 { 335 336 // 1. Convert linear ProPhoto RGB values to HSV. 337 // 2. Use the HSV coordinates to index into the color table. 338 // 3. Apply color table result to the original HSV values. 339 // 4. Convert modified HSV values back to linear ProPhoto RGB. 340 341 encoding_Linear = 0, 342 343 // 1. Convert linear ProPhoto RGB values to HSV. 344 // 2. Encode V coordinate using sRGB encoding curve. 345 // 3. Use the encoded HSV coordinates to index into the color table. 346 // 4. Apply color table result to the encoded values from step 2. 347 // 5. Decode V coordinate using sRGB decoding curve (inverse of step 2). 348 // 6. Convert HSV values back to linear ProPhoto RGB (inverse of step 1). 349 350 encoding_sRGB = 1 351 352 }; 353 354/*****************************************************************************/ 355 356// Values for the DefaultBlackRender tag. 357 358enum 359 { 360 361 // By default, the renderer applies (possibly auto-calculated) black subtraction 362 // prior to the look table. 363 364 defaultBlackRender_Auto = 0, 365 366 // By default, the renderer does not apply any black subtraction prior to the 367 // look table. 368 369 defaultBlackRender_None = 1 370 371 }; 372 373/*****************************************************************************/ 374 375// Values for the PreviewColorSpace tag. 376 377enum PreviewColorSpaceEnum 378 { 379 380 previewColorSpace_Unknown = 0, 381 previewColorSpace_GrayGamma22 = 1, 382 previewColorSpace_sRGB = 2, 383 previewColorSpace_AdobeRGB = 3, 384 previewColorSpace_ProPhotoRGB = 4, 385 386 previewColorSpace_LastValid = previewColorSpace_ProPhotoRGB, 387 388 previewColorSpace_MaxEnum = 0xFFFFFFFF 389 390 }; 391 392/*****************************************************************************/ 393 394// Values for CacheVersion tag. 395 396enum 397 { 398 399 // The low-16 bits are a rendering version number. 400 401 cacheVersionMask = 0x0FFFF, 402 403 // Default cache version. 404 405 cacheVersionDefault = 0x00100, 406 407 // Is this an integer preview of a floating point image? 408 409 cacheVersionDefloated = 0x10000, 410 411 // Is this an flattening preview of an image with tranparency? 412 413 cacheVersionFlattened = 0x20000, 414 415 // Was this preview build using a the default baseline multi-channel 416 // CFA merge (i.e. only using the first channel)? 417 418 cacheVersionFakeMerge = 0x40000 419 420 }; 421 422/*****************************************************************************/ 423 424// TIFF-style byte order markers. 425 426enum 427 { 428 429 byteOrderII = 0x4949, // 'II' 430 byteOrderMM = 0x4D4D // 'MM' 431 432 }; 433 434/*****************************************************************************/ 435 436// "Magic" numbers. 437 438enum 439 { 440 441 // DNG related. 442 443 magicTIFF = 42, // TIFF (and DNG) 444 magicExtendedProfile = 0x4352, // 'CR' 445 magicRawCache = 1022, // Raw cache (fast load data) 446 447 // Other raw formats - included here so the DNG SDK can parse them. 448 449 magicPanasonic = 85, 450 magicOlympusA = 0x4F52, 451 magicOlympusB = 0x5352 452 453 }; 454 455/*****************************************************************************/ 456 457// DNG Version numbers 458 459enum 460 { 461 462 dngVersion_None = 0, 463 464 dngVersion_1_0_0_0 = 0x01000000, 465 dngVersion_1_1_0_0 = 0x01010000, 466 dngVersion_1_2_0_0 = 0x01020000, 467 dngVersion_1_3_0_0 = 0x01030000, 468 dngVersion_1_4_0_0 = 0x01040000, 469 470 dngVersion_Current = dngVersion_1_4_0_0, 471 472 dngVersion_SaveDefault = dngVersion_Current 473 474 }; 475 476/*****************************************************************************/ 477 478#endif 479 480/*****************************************************************************/ 481