summaryrefslogtreecommitdiff
path: root/source/dng_tag_values.h
blob: 3b295d8b59c57bcc5158de0ed0c0330a86df4e10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
/*****************************************************************************/
// Copyright 2006-2007 Adobe Systems Incorporated
// All Rights Reserved.
//
// NOTICE:  Adobe permits you to use, modify, and distribute this file in
// accordance with the terms of the Adobe license agreement accompanying it.
/*****************************************************************************/

/* $Id: //mondo/dng_sdk_1_4/dng_sdk/source/dng_tag_values.h#1 $ */ 
/* $DateTime: 2012/05/30 13:28:51 $ */
/* $Change: 832332 $ */
/* $Author: tknoll $ */

/*****************************************************************************/

#ifndef __dng_tag_values__
#define __dng_tag_values__

/*****************************************************************************/

#include "dng_flags.h"

/*****************************************************************************/

// Values for NewSubFileType tag.

enum
	{
	
	// The main image data.
	
	sfMainImage					= 0,
	
	// Preview image for the primary settings.
	
	sfPreviewImage				= 1,
	
	// Transparency mask
	
	sfTransparencyMask			= 4,
	
	// Preview Transparency mask
	
	sfPreviewMask				= sfPreviewImage + sfTransparencyMask,
	
	// Preview image for non-primary settings.
	
	sfAltPreviewImage			= 0x10001
	
	};

/******************************************************************************/

// Values for PhotometricInterpretation tag.

enum
	{

	piWhiteIsZero 				= 0,
	piBlackIsZero				= 1,
	piRGB						= 2,
	piRGBPalette				= 3,
	piTransparencyMask			= 4,
	piCMYK						= 5,
	piYCbCr						= 6,
	piCIELab					= 8,
	piICCLab					= 9,

	piCFA						= 32803,		// TIFF-EP spec

	piLinearRaw					= 34892

	};

/******************************************************************************/

// Values for PlanarConfiguration tag.

enum
	{
	
	pcInterleaved				= 1,
	pcPlanar					= 2,
	
	// Ordering, using an RGB image as an example:
	//
	// RRRRRRRRRR
	// GGGGGGGGGG
	// BBBBBBBBBB
	// RRRRRRRRRR
	// GGGGGGGGGG
	// BBBBBBBBBB
	//
	// The "Align16" variant additionally ensures that the offset of each
	// plane's row is aligned to an integer multiple of 16 bytes from the
	// beginning of the buffer.
	pcRowInterleaved			= 100000,		// Internal use only
	pcRowInterleavedAlign16		= 100001		// Internal use only
	
	};

/******************************************************************************/

// Values for ExtraSamples tag.

enum
	{
	
	esUnspecified				= 0,
	esAssociatedAlpha			= 1,
	esUnassociatedAlpha			= 2
	
	};

/******************************************************************************/

// Values for SampleFormat tag.

enum
	{
	
	sfUnsignedInteger			= 1,
	sfSignedInteger				= 2,
	sfFloatingPoint				= 3,
	sfUndefined					= 4
	
	};

/******************************************************************************/

// Values for Compression tag.

enum
	{
	
	ccUncompressed				= 1,
	ccLZW						= 5,
	ccOldJPEG					= 6,
	ccJPEG						= 7,
	ccDeflate					= 8,
	ccPackBits					= 32773,
	ccOldDeflate				= 32946,
	
	// Used in DNG files in places that allow lossless JPEG.
	
	ccLossyJPEG					= 34892
	
	};

/******************************************************************************/

// Values for Predictor tag.

enum
	{
	
	cpNullPredictor				= 1,
	cpHorizontalDifference		= 2,
	cpFloatingPoint				= 3,
	
	cpHorizontalDifferenceX2	= 34892,
	cpHorizontalDifferenceX4	= 34893,
	cpFloatingPointX2			= 34894,
	cpFloatingPointX4			= 34895
	
	};

/******************************************************************************/

// Values for ResolutionUnit tag.

enum
	{
	
	ruNone						= 1,
	ruInch						= 2,
	ruCM						= 3,
	ruMM						= 4,
	ruMicroM					= 5
	
	};		

/******************************************************************************/

// Values for LightSource tag.

enum
	{
	
	lsUnknown					=  0,
	
	lsDaylight					=  1,
	lsFluorescent				=  2,
	lsTungsten					=  3,
	lsFlash						=  4,
	lsFineWeather				=  9,
	lsCloudyWeather				= 10,
	lsShade						= 11,
	lsDaylightFluorescent		= 12,		// D  5700 - 7100K
	lsDayWhiteFluorescent		= 13,		// N  4600 - 5500K
	lsCoolWhiteFluorescent		= 14,		// W  3800 - 4500K
	lsWhiteFluorescent			= 15,		// WW 3250 - 3800K
	lsWarmWhiteFluorescent		= 16,		// L  2600 - 3250K
	lsStandardLightA			= 17,
	lsStandardLightB			= 18,
	lsStandardLightC			= 19,
	lsD55						= 20,
	lsD65						= 21,
	lsD75						= 22,
	lsD50						= 23,
	lsISOStudioTungsten			= 24,
	
	lsOther						= 255
	
	};

/******************************************************************************/

// Values for ExposureProgram tag.

enum
	{
	
	epUnidentified				= 0,
	epManual					= 1,
	epProgramNormal				= 2,
	epAperturePriority			= 3,
	epShutterPriority			= 4,
	epProgramCreative			= 5,
	epProgramAction				= 6,
	epPortraitMode				= 7,
	epLandscapeMode				= 8
	
	};		

/******************************************************************************/

// Values for MeteringMode tag.

enum
	{
	
	mmUnidentified				= 0,
	mmAverage					= 1,
	mmCenterWeightedAverage		= 2,
	mmSpot						= 3,
	mmMultiSpot					= 4,
	mmPattern					= 5,
	mmPartial					= 6,
	
	mmOther						= 255
	
	};		

/******************************************************************************/

// CFA color codes from the TIFF/EP specification.

enum ColorKeyCode
	{
	
	colorKeyRed					= 0,
	colorKeyGreen				= 1,
	colorKeyBlue				= 2,
	colorKeyCyan				= 3,
	colorKeyMagenta				= 4,
	colorKeyYellow				= 5,
	colorKeyWhite				= 6,
	
	colorKeyMaxEnum				= 0xFF
	
	};

/*****************************************************************************/

// Values for the SensitivityType tag.

enum
	{
		
	stUnknown					= 0,

	stStandardOutputSensitivity = 1,
	stRecommendedExposureIndex	= 2,
	stISOSpeed					= 3,
	stSOSandREI					= 4,
	stSOSandISOSpeed			= 5,
	stREIandISOSpeed			= 6,
	stSOSandREIandISOSpeed		= 7
		
	};
	
/*****************************************************************************/

// Values for the ColorimetricReference tag.  It specifies the colorimetric
// reference used for images with PhotometricInterpretation values of CFA
// or LinearRaw.

enum
	{
	
	// Scene referred (default):
	
	crSceneReferred				= 0,
	
	// Output referred using the parameters of the ICC profile PCS.
	
	crICCProfilePCS				= 1
	
	};

/*****************************************************************************/

// Values for the ProfileEmbedPolicy tag.

enum
	{
	
	// Freely embedable and copyable into installations that encounter this
	// profile, so long as the profile is only used to process DNG files.
	
	pepAllowCopying				= 0,
	
	// Can be embeded in a DNG for portable processing, but cannot be used
	// to process other files that the profile is not embedded in.
	
	pepEmbedIfUsed				= 1,
	
	// Can only be used if installed on the machine processing the file. 
	// Note that this only applies to stand-alone profiles.  Profiles that
	// are already embedded inside a DNG file allowed to remain embedded 
	// in that DNG, even if the DNG is resaved.
	
	pepEmbedNever				= 2,
	
	// No restricts on profile use or embedding.
	
	pepNoRestrictions			= 3

	};

/*****************************************************************************/

// Values for the ProfileHueSatMapEncoding and ProfileLookTableEncoding tags.

enum
	{
	
	// 1. Convert linear ProPhoto RGB values to HSV.
	// 2. Use the HSV coordinates to index into the color table.
	// 3. Apply color table result to the original HSV values.
	// 4. Convert modified HSV values back to linear ProPhoto RGB.
	
	encoding_Linear				= 0,
	
	// 1. Convert linear ProPhoto RGB values to HSV.
	// 2. Encode V coordinate using sRGB encoding curve.
	// 3. Use the encoded HSV coordinates to index into the color table.
	// 4. Apply color table result to the encoded values from step 2.
	// 5. Decode V coordinate using sRGB decoding curve (inverse of step 2).
	// 6. Convert HSV values back to linear ProPhoto RGB (inverse of step 1).

	encoding_sRGB				= 1
	
	};

/*****************************************************************************/

// Values for the DefaultBlackRender tag.

enum
	{

	// By default, the renderer applies (possibly auto-calculated) black subtraction
	// prior to the look table.
	
	defaultBlackRender_Auto		= 0,
	
	// By default, the renderer does not apply any black subtraction prior to the
	// look table.
	
	defaultBlackRender_None		= 1
	
	};

/*****************************************************************************/

// Values for the PreviewColorSpace tag.

enum PreviewColorSpaceEnum
	{
	
	previewColorSpace_Unknown		= 0,
	previewColorSpace_GrayGamma22	= 1,
	previewColorSpace_sRGB			= 2,
	previewColorSpace_AdobeRGB      = 3,
	previewColorSpace_ProPhotoRGB	= 4,
	
	previewColorSpace_LastValid		= previewColorSpace_ProPhotoRGB,

	previewColorSpace_MaxEnum		= 0xFFFFFFFF
	
	};

/*****************************************************************************/

// Values for CacheVersion tag.

enum
	{
	
	// The low-16 bits are a rendering version number.
	
	cacheVersionMask				= 0x0FFFF,
	
	// Default cache version. 
	
	cacheVersionDefault				= 0x00100,
	
	// Is this an integer preview of a floating point image?
	
	cacheVersionDefloated			= 0x10000,
	
	// Is this an flattening preview of an image with tranparency?
	
	cacheVersionFlattened			= 0x20000,
	
	// Was this preview build using a the default baseline multi-channel
	// CFA merge (i.e. only using the first channel)?
	
	cacheVersionFakeMerge			= 0x40000
	
	};

/*****************************************************************************/

// TIFF-style byte order markers.

enum
	{
	
	byteOrderII					= 0x4949,		// 'II'
	byteOrderMM					= 0x4D4D		// 'MM'
	
	};

/*****************************************************************************/

// "Magic" numbers.

enum
	{
	
	// DNG related.
	
	magicTIFF					= 42,			// TIFF (and DNG)
	magicExtendedProfile		= 0x4352,		// 'CR'
	magicRawCache				= 1022,			// Raw cache (fast load data)
	
	// Other raw formats - included here so the DNG SDK can parse them.
	
	magicPanasonic				= 85,
	magicOlympusA				= 0x4F52,
	magicOlympusB				= 0x5352
	
	};
	
/*****************************************************************************/

// DNG Version numbers

enum
	{
	
	dngVersion_None				= 0,
	
	dngVersion_1_0_0_0			= 0x01000000,
	dngVersion_1_1_0_0			= 0x01010000,
	dngVersion_1_2_0_0			= 0x01020000,
	dngVersion_1_3_0_0			= 0x01030000,
	dngVersion_1_4_0_0			= 0x01040000,
	
	dngVersion_Current			= dngVersion_1_4_0_0,
	
	dngVersion_SaveDefault		= dngVersion_Current
	
	};

/*****************************************************************************/

#endif
	
/*****************************************************************************/