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