1 //  ----------------------------------------------------------------------------
2 //  MODULE    : FlashPixUtils.h
3 //  LANGUAGE  : C++
4 //  AUTHORS   : Nicolas ROMANTZOFF, Philippe BOSSUT
5 //  DATE    : Friday, July 7th 1995
6 //  DESCRIPTION : Names, IDs and Types of things as they are defined in the FPX spec:
7 //                FPX Image Specification, Final Draft, Eastman Kodak company,
8 //                December 7 1995
9 //  COMMENT   : EVERYTHING you could find in the spec should be found here
10 //          and only here as a define.
11 //  SCCSID      : @(#)fpxutils.h  1.2 04:09:42 29 Jan 1997
12 //  ----------------------------------------------------------------------------
13 //  Copyright (c) 1999 Digital Imaging Group, Inc.
14 //  For conditions of distribution and use, see copyright notice
15 //  in Flashpix.h
16 //  ----------------------------------------------------------------------------
17 //  ----------------------------------------------------------------------------
18   #ifndef FlashPixUtils_h
19   #define FlashPixUtils_h
20 //  ----------------------------------------------------------------------------
21 
22 //  Includes
23 //  --------
24 
25 #ifndef OLECommun_h
26   #include "olecomm.h"    // For the definition of the BLOB structure
27 #endif
28 #ifndef FPXBaselineIO_h
29   #include "fpxlibio.h"   // For the definition of the data type conversions
30 #endif
31 
32 //  Constants
33 //  ---------
34 
35   // Names of the streams and storages. Streams start with '\005'
36   #define StreamPrefix        '\005'
37   #define FMT_SummaryInfoName     "%cSummaryInformation"
38   #define FMT_ImageInfoName     "%cImage Info"
39   #define FMT_ImageContentName    "%cImage Contents"
40   #define FMT_ResolutionName      "Resolution %04d"
41   #define FMT_SubImageHdrName     "Subimage %04d Header"
42   #define FMT_SubImageDataName    "Subimage %04d Data"
43   #define FMT_SupportDataName       "Support Data %04d"
44   #define FMT_ICCProfiles       "ICC Profile %04d"
45   #define FMT_CustomLink        "%cCustom Link"
46 
47   // FPX Image View
48   #define FMT_GlobalInfo        "%cGlobal Info"
49   #define FMT_ImageDescription    "%cData Object %06d"
50   #define FMT_ImageStore        "Data Object Store %06d"
51   #define FMT_Transform       "%cTransform %06d"
52   #define FMT_Operation       "%cOperation %06d"
53   #define FMT_Extension       "%cExtension List"
54 
55   // CLSID of the streams and storages
56   // ---------------------------------
57 
58   #define ID_FlashPixSuffix(prefix)  {prefix,0xC154,0x11CE,{0x85,0x53,0x00,0xAA,0x00,0xA1,0xF9,0x5B}}
59   #define ID_SummaryInfo  {0xF29F85E0,0x4FF9,0x1068,{0xAB,0x91,0x08,0x00,0x2B,0x27,0xB3,0xD9}}
60 
61   // FPX Image Object
62   #define ID_Baseline     ID_FlashPixSuffix(0x56616000)
63   #define ID_ImageInfo    ID_FlashPixSuffix(0x56616500)
64   #define ID_ImageContent ID_FlashPixSuffix(0x56616400)
65   #define ID_Resolution   ID_FlashPixSuffix(0x56616100)
66   #define ID_SubImageHdr  ID_FlashPixSuffix(0x00010000)
67   #define ID_SubImageData ID_FlashPixSuffix(0x00010100)
68   #define ID_SupportData  ID_FlashPixSuffix(0x00010200)
69   #define ID_ICCProfiles  ID_FlashPixSuffix(0x56616600)
70 
71   // FPX Image View
72   #define ID_ImageView      ID_FlashPixSuffix(0x56616700)
73   #define ID_TransfImage      ID_FlashPixSuffix(0x56616800)
74   #define ID_CachedView     ID_FlashPixSuffix(0x00000200)
75   #define ID_CachedTransf     ID_FlashPixSuffix(0x00000100)
76   #define ID_GlobalInfo     ID_FlashPixSuffix(0x56616F00)
77   #define ID_ImageDescription   ID_FlashPixSuffix(0x56616080)
78   #define ID_Transform      ID_FlashPixSuffix(0x56616A00)
79   #define ID_Operation      ID_FlashPixSuffix(0x56616E00)
80   #define ID_Extension      ID_FlashPixSuffix(0x56616010)
81 
82   // Custom Monikers
83   #define ID_CustomMoniker  ID_FlashPixSuffix(0x56616200)
84   #define ID_LocalFileMoniker ID_FlashPixSuffix(0x00030000)
85   #define ID_URLMoniker   ID_FlashPixSuffix(0x00030100)
86 
87   // Other IDs
88   #define ID_URLAction    ID_FlashPixSuffix(0x00020000)
89 
90   // ID Codes and Types of all FPX Properties:
91   // -----------------------------------------
92   // Comment: on the disk, it's always in the right side (little endian)...
93 
94   // Image Contents Property Set: Primary Description Group
95   #define PID_NbResolutions       (DWORD)(0x01000000)
96   #define PID_HiResWidth          (DWORD)(0x01000002)
97   #define PID_HiResHeight         (DWORD)(0x01000003)
98   #define PID_DefaultDisplHeight      (DWORD)(0x01000004)
99   #define PID_DefaultDisplWidth     (DWORD)(0x01000005)
100   #define PID_DefaultDisplUnit      (DWORD)(0x01000006)
101 
102   #define TYP_NbResolutions       VT_UI4
103   #define TYP_HiResWidth          VT_UI4
104   #define TYP_HiResHeight         VT_UI4
105   #define TYP_DefaultDisplHeight      VT_R4
106   #define TYP_DefaultDisplWidth     VT_R4
107   #define TYP_DefaultDisplUnit      VT_UI4
108 
109   // Image Contents Property Set: Resolution Description Group
110   #define PID_ResolutionRoot(id,resNum)     (DWORD)(0x02000000 | id | (resNum<<16))
111 
112   #define PID_SubImageWidth(resNum)       PID_ResolutionRoot(0x00,resNum)
113   #define PID_SubImageHeight(resNum)        PID_ResolutionRoot(0x01,resNum)
114   #define PID_SubImageColor(resNum)       PID_ResolutionRoot(0x02,resNum)
115   #define PID_SubImageNumFormat(resNum)     PID_ResolutionRoot(0x03,resNum)
116   #define PID_DecimationMethod(resNum)      PID_ResolutionRoot(0x04,resNum)
117   #define PID_DecimationPrefilterWidth(resNum)  PID_ResolutionRoot(0x05,resNum)
118   #define PID_SubImageAttributes(resNum)      PID_ResolutionRoot(0x06,resNum)
119   #define PID_SubImageICCProfile(resNum)      PID_ResolutionRoot(0x07,resNum)
120   #define PID_SupportDataContents(resNum)     PID_ResolutionRoot(0x08,resNum)
121 
122   #define TYP_SubImageWidth           VT_UI4
123   #define TYP_SubImageHeight            VT_UI4
124   #define TYP_SubImageColor           VT_BLOB
125   #define TYP_SubImageNumFormat         VT_UI4|VT_VECTOR
126   #define TYP_DecimationMethod          VT_I4
127   #define TYP_DecimationPrefilterWidth      VT_R4
128   #define TYP_SubImageAttributes          VT_TBD|VT_VECTOR
129   #define TYP_SubImageICCProfile          VT_UI2|VT_VECTOR
130   #define TYP_SupportDataContents         VT_TBD|VT_VECTOR
131 
132   #define DecimationStandard            0x7FFFFFFF
133 
134   // Image Contents Property Set: Compression Information Group
135   #define PID_CompressionRoot(id,compressIndex)     (0x03000000 | id | (compressIndex<<16))
136 
137   #define PID_JPEGTables(compressIndex)   PID_CompressionRoot(0x01,compressIndex)
138   #define PID_MaxJPEGTables         PID_CompressionRoot(0x02, 0)
139 
140   #define TYP_JPEGTables            VT_BLOB
141   #define TYP_MaxJPEGTables         VT_UI4
142 
143   // Image Contents Property Set: Path Specification Group
144   #define PID_NumberOfPaths   0x04000000
145   #define PID_PathNames     0x04000001
146   #define PID_PathDefinition    0x04000002
147 
148   #define TYP_NumberOfPaths   VT_UI4
149   #define TYP_PathNames     VT_LPWSTR|VT_VECTOR
150   #define TYP_PathDefinition    VT_BLOB|VT_VECTOR
151 
152   // Custom Monikers Property Set
153   #define PID_OLEMoniker      0x00010000
154   #define PID_AbsoluteFilePath  0x00020001
155   #define PID_RelativeFilePath  0x00020002
156   #define PID_AbsoluteStoragePath 0x00020003
157   #define PID_PhysicalVolumeName  0x00020004
158   #define PID_VirtualVolumeName 0x00020005
159   #define PID_LastMountPoint    0x00020006
160 //  #define PID_Connection      0x00020103
161 //  #define PID_HostAddress     0x00020104
162 
163   #define TYP_OLEMoniker      VT_BLOB
164   #define TYP_AbsoluteFilePath  VT_LPWSTR
165   #define TYP_RelativeFilePath  VT_LPWSTR
166   #define TYP_AbsoluteStoragePath VT_LPWSTR
167   #define TYP_PhysicalVolumeName  VT_LPWSTR
168   #define TYP_VirtualVolumeName VT_LPWSTR
169   #define TYP_LastMountPoint    VT_LPWSTR
170 //  #define TYP_Connection      VT_LPWSTR
171 //  #define TYP_HostAddress     VT_LPWSTR
172 
173 
174   // Image Info Property Set (a.k.a. Non-Image data): File Source Group
175   #define PID_FileSource      0x21000000
176   #define PID_SceneType     0x21000001
177   #define PID_CreationPath    0x21000002
178   #define PID_SoftwareName    0x21000003
179   #define PID_UserDefinedID   0x21000004
180   #define PID_Sharpness     0x21000005
181 
182   #define TYP_FileSource      VT_UI4
183   #define TYP_SceneType     VT_UI4
184   #define TYP_CreationPath    VT_UI4|VT_VECTOR
185   #define TYP_SoftwareName    VT_LPWSTR
186   #define TYP_UserDefinedID   VT_LPWSTR
187   #define TYP_Sharpness     VT_R4
188 
189   // Image Info Property Set (a.k.a. Non-Image data): Intellectual Property Group
190   #define PID_Copyright     0x22000000
191   #define PID_OriginalBroker    0x22000001
192   #define PID_DigitalBroker   0x22000002
193   #define PID_Authorship      0x22000003
194   #define PID_PropertyNotes   0x22000004
195 
196   #define TYP_Copyright     VT_LPWSTR
197   #define TYP_OriginalBroker    VT_LPWSTR
198   #define TYP_DigitalBroker   VT_LPWSTR
199   #define TYP_Authorship      VT_LPWSTR
200   #define TYP_PropertyNotes   VT_LPWSTR
201 
202   // Image Info Property Set (a.k.a. Non-Image data): Content Description Group
203   #define PID_TestTargetType    0x23000000
204   #define PID_GroupCaption    0x23000002
205   #define PID_CaptionText     0x23000003
206   #define PID_PeopleInTheImage  0x23000004
207   #define PID_ThingsInTheImage  0x23000007
208   #define PID_DateOfTheOriginal 0x2300000A
209   #define PID_EventsInTheImage  0x2300000B
210   #define PID_PlacesInTheImage  0x2300000C
211   #define PID_DescriptionNotes  0x2300000F
212 
213   #define TYP_TestTargetType    VT_UI4
214   #define TYP_GroupCaption    VT_LPWSTR
215   #define TYP_CaptionText     VT_LPWSTR
216   #define TYP_PeopleInTheImage  VT_LPWSTR|VT_VECTOR
217   #define TYP_ThingsInTheImage  VT_LPWSTR|VT_VECTOR
218   #define TYP_DateOfTheOriginal VT_FILETIME
219   #define TYP_EventsInTheImage  VT_LPWSTR|VT_VECTOR
220   #define TYP_PlacesInTheImage  VT_LPWSTR|VT_VECTOR
221   #define TYP_DescriptionNotes  VT_LPWSTR
222 
223   // Image Info Property Set (a.k.a. Non-Image data): Camera Information Group
224   #define PID_CameraManufacturer  0x24000000
225   #define PID_CameraModel     0x24000001
226   #define PID_CameraSerialNumber  0x24000002
227 
228   #define TYP_CameraManufacturer  VT_LPWSTR
229   #define TYP_CameraModel     VT_LPWSTR
230   #define TYP_CameraSerialNumber  VT_LPWSTR
231 
232   // Image Info Property Set (a.k.a. Non-Image data): Per Picture Camera Settings Group
233   #define PID_CaptureDate     0x25000000
234   #define PID_ExposureTime    0x25000001
235   #define PID_F_Number      0x25000002
236   #define PID_ExposureProgram   0x25000003
237   #define PID_BrightnessValue   0x25000004
238   #define PID_ExposureBiasValue 0x25000005
239   #define PID_SubjectDistance   0x25000006
240   #define PID_MeteringMode    0x25000007
241   #define PID_SceneIlluminant   0x25000008
242   #define PID_FocalLength     0x25000009
243   #define PID_ApertureValue   0x2500000A
244   #define PID_Flash       0x2500000B
245   #define PID_FlashEnergy     0x2500000C
246   #define PID_FlashReturn     0x2500000D
247   #define PID_BackLight     0x2500000E
248   #define PID_SubjectLocation   0x2500000F
249   #define PID_ExposureIndex   0x25000010
250   #define PID_OpticalFilter   0x25000011
251   #define PID_PerPictureNotes   0x25000012
252 
253   #define TYP_CaptureDate     VT_FILETIME
254   #define TYP_ExposureTime    VT_R4
255   #define TYP_F_Number      VT_R4
256   #define TYP_ExposureProgram   VT_UI4
257   #define TYP_BrightnessValue   VT_R4|VT_VECTOR
258   #define TYP_ExposureBiasValue VT_R4
259   #define TYP_SubjectDistance   VT_R4|VT_VECTOR
260   #define TYP_MeteringMode    VT_UI4
261   #define TYP_SceneIlluminant   VT_UI4
262   #define TYP_FocalLength     VT_R4
263   #define TYP_ApertureValue   VT_R4
264   #define TYP_Flash       VT_UI4
265   #define TYP_FlashEnergy     VT_R4
266   #define TYP_FlashReturn     VT_UI4
267   #define TYP_BackLight     VT_UI4
268   #define TYP_SubjectLocation   VT_R4|VT_VECTOR
269   #define TYP_ExposureIndex   VT_R4
270   #define TYP_OpticalFilter   VT_UI4|VT_VECTOR
271   #define TYP_PerPictureNotes   VT_LPWSTR
272 
273   // Image Info Property Set (a.k.a. Non-Image data): Digital Camera Characterization Group
274   #define PID_SensingMethod       0x26000000
275   #define PID_FocalXResolution      0x26000001
276   #define PID_FocalYResolution      0x26000002
277   #define PID_FocalResolutionUnit     0x26000003
278   #define PID_SpatialFrequencyResponse  0x26000004
279   #define PID_CFAPattern          0x26000005
280   #define PID_SpectralSensitivity     0x26000006
281   #define PID_ISOSpeedRatings       0x26000007
282   #define PID_OECF            0x26000008
283 
284   #define TYP_SensingMethod       VT_UI4
285   #define TYP_FocalXResolution      VT_R4
286   #define TYP_FocalYResolution      VT_R4
287   #define TYP_FocalResolutionUnit     VT_UI4
288   #define TYP_SpatialFrequencyResponse  VT_VARIANT|VT_VECTOR
289   #define TYP_CFAPattern          VT_VARIANT|VT_VECTOR
290   #define TYP_SpectralSensitivity     VT_LPWSTR
291   #define TYP_ISOSpeedRatings       VT_UI2|VT_VECTOR
292   #define TYP_OECF            VT_VARIANT|VT_VECTOR
293 
294   // Image Info Property Set (a.k.a. Non-Image data): Film Description Group
295   #define PID_FilmBrand     0x27000000
296   #define PID_FilmCategory    0x27000001
297   #define PID_FilmSize      0x27000002
298   #define PID_FilmRollNumber    0x27000003
299   #define PID_FilmFrameNumber   0x27000004
300 
301   #define TYP_FilmBrand     VT_LPWSTR
302   #define TYP_FilmCategory    VT_UI4
303   #define TYP_FilmSize      VT_VARIANT|VT_VECTOR
304   #define TYP_FilmRollNumber    VT_UI4
305   #define TYP_FilmFrameNumber   VT_UI4
306 
307   // Image Info Property Set (a.k.a. Non-Image data): Original Document Scan Description Group
308   #define PID_ScannedImageSize  0x29000000
309   #define PID_DocumentSize    0x29000001
310   #define PID_OriginalMedium    0x29000002
311   #define PID_TypeOfOriginal    0x29000003
312 
313   #define TYP_ScannedImageSize  VT_VARIANT|VT_VECTOR
314   #define TYP_DocumentSize    VT_VARIANT|VT_VECTOR
315   #define TYP_OriginalMedium    VT_UI4
316   #define TYP_TypeOfOriginal    VT_UI4
317 
318   // Image Info Property Set (a.k.a. Non-Image data): Scan Device Property Group
319   #define PID_ScannerManufacturer 0x28000000
320   #define PID_ScannerModel    0x28000001
321   #define PID_ScannerSerialNumber 0x28000002
322   #define PID_ScanSoftware    0x28000003
323   #define PID_ScanSoftRevDate   0x28000004
324   #define PID_ServiceBureau   0x28000005
325   #define PID_ScanOperatorID    0x28000006
326   #define PID_ScanDate      0x28000008
327   #define PID_LastModifiedDate  0x28000009
328   #define PID_ScannerPixelSize  0x2800000A
329 
330   #define TYP_ScannerManufacturer VT_LPWSTR
331   #define TYP_ScannerModel    VT_LPWSTR
332   #define TYP_ScannerSerialNumber VT_LPWSTR
333   #define TYP_ScanSoftware    VT_LPWSTR
334   #define TYP_ScanSoftRevDate   VT_DATE
335   #define TYP_ServiceBureau   VT_LPWSTR
336   #define TYP_ScanOperatorID    VT_LPWSTR
337   #define TYP_ScanDate      VT_FILETIME
338   #define TYP_LastModifiedDate  VT_FILETIME
339   #define TYP_ScannerPixelSize  VT_R4
340 
341   // FPX Image View:
342   // ---------------
343 
344   // Source and result description property set
345 
346   #define PID_ImageID       0x00010000
347 //  #define PID_Reserved      0x00010001
348   #define PID_LockedPropertyList  0x00010002
349   #define PID_Title         0x00010003
350   #define PID_LastModifier    0x00010004
351   #define PID_RevisionNumber    0x00010005
352   #define PID_CreationTime    0x00010006
353   #define PID_ModificationTime  0x00010007
354   #define PID_CreatingApplication 0x00010008
355   #define PID_Status        0x00010100
356   #define PID_Creator       0x00010101
357   #define PID_Users       0x00010102
358   #define PID_CachedImageHeight 0x10000000
359   #define PID_CachedImageWidth  0x10000001
360 
361   #define TYP_ImageID       VT_CLSID
362 //  #define TYP_Reserved      VT_XX
363   #define TYP_LockedPropertyList  VT_UI4|VT_VECTOR
364   #define TYP_Title         VT_LPWSTR
365   #define TYP_LastModifier    VT_LPWSTR
366   #define TYP_RevisionNumber    VT_UI4
367   #define TYP_CreationTime    VT_FILETIME
368   #define TYP_ModificationTime  VT_FILETIME
369   #define TYP_CreatingApplication VT_LPWSTR
370   #define TYP_Status        VT_UI4
371   #define TYP_Creator       VT_UI4
372   #define TYP_Users       VT_UI4|VT_VECTOR
373   #define TYP_CachedImageHeight VT_UI4
374   #define TYP_CachedImageWidth  VT_UI4
375 
376   // Transform Property Set
377 
378   #define PID_TransformNodeID   0x00010000
379   #define PID_OperationClassID  0x00010001
380 //  #define PID_LockedPropertyList  0x00010002
381 //  #define PID_Title           0x00010003
382 //  #define PID_LastModifier    0x00010004
383 //  #define PID_RevisionNumber    0x00010005
384 //  #define PID_CreationTime    0x00010006
385 //  #define PID_ModificationTime  0x00010007
386 //  #define PID_CreatingApplication 0x00010008
387   #define PID_InputObjectList   0x00010100
388   #define PID_OutputObjectList  0x00010101
389   #define PID_OperationNumber   0x00010102
390   #define PID_ResultAspectRatio 0x10000000
391   #define PID_RectOfInterest    0x10000001
392   #define PID_Filtering     0x10000002
393   #define PID_SpatialOrientation  0x10000003
394   #define PID_ColortwistMatrix  0x10000004
395   #define PID_ContrastAdjust    0x10000005
396 
397   #define TYP_TransformNodeID   VT_CLSID
398   #define TYP_OperationClassID  VT_CLSID
399 //  #define TYP_LockedPropertyList  VT_UI4|VT_VECTOR
400 //  #define TYP_Title           VT_LPWSTR
401 //  #define TYP_LastModifier    VT_LPWTSR
402 //  #define TYP_RevisionNumber    VT_UI4
403 //  #define TYP_CreationTime    VT_FILETIME
404 //  #define TYP_ModificationTime  VT_FILETIME
405 //  #define TYP_CreatingApplication VT_LPWSTR
406   #define TYP_InputObjectList   VT_UI4|VT_VECTOR
407   #define TYP_OutputObjectList  VT_UI4|VT_VECTOR
408   #define TYP_OperationNumber   VT_UI4
409   #define TYP_ResultAspectRatio VT_R4
410   #define TYP_RectOfInterest    VT_R4|VT_VECTOR
411   #define TYP_Filtering     VT_R4
412   #define TYP_SpatialOrientation  VT_R4|VT_VECTOR
413   #define TYP_ColortwistMatrix  VT_R4|VT_VECTOR
414   #define TYP_ContrastAdjust    VT_R4
415 
416   // Operation Property Set
417 
418   #define PID_OperationID     0x00010000
419   #define TYP_OperationID     VT_CLSID
420 
421   // Summary Info Property Set
422   #define FPX_CODEPAGE    0x04B0
423 #ifndef PID_DICTIONARY
424   #define PID_DICTIONARY    0x00000000
425 #endif
426 #ifndef PID_CODEPAGE
427   #define PID_CODEPAGE    0x00000001 /* VT_I2 */ /* required */
428 #endif
429   #define PID_TITLE     0x00000002 /* VT_LPSTR */
430   #define PID_SUBJECT     0x00000003 /* VT_LPSTR */
431   #define PID_AUTHOR      0x00000004 /* VT_LPSTR */
432   #define PID_KEYWORDS    0x00000005 /* VT_LPSTR */
433   #define PID_COMMENTS    0x00000006 /* VT_LPSTR */
434   #define PID_TEMPLATE    0x00000007 /* VT_LPSTR */
435   #define PID_LASTAUTHOR    0x00000008 /* VT_LPSTR */
436   #define PID_REV_NUMBER    0x00000009 /* VT_LPSTR */
437   #define PID_EDITTIME    0x0000000a /* VT_FILETIME */
438   #define PID_LASTPRINTED   0x0000000b /* VT_FILETIME */
439   #define PID_CREATE_DTM    0x0000000c /* VT_FILETIME */
440   #define PID_LASTSAVE_DTM  0x0000000d /* VT_FILETIME */
441   #define PID_PAGECOUNT   0x0000000e /* VT_I4 */
442   #define PID_WORDCOUNT   0x0000000f /* VT_I4 */
443   #define PID_CHARCOUNT   0x00000010 /* VT_I4 */
444   #define PID_THUMBNAIL   0x00000011 /* VT_CF */
445   #define PID_APPNAME     0x00000012 /* VT_LPSTR */
446 #ifndef PID_SECURITY
447   #define PID_SECURITY    0x00000013 /* VT_I4 */
448 #endif
449 
450   #define TYP_CODEPAGE    VT_I2
451   #define TYP_TITLE     VT_LPSTR
452   #define TYP_SUBJECT     VT_LPSTR
453   #define TYP_AUTHOR      VT_LPSTR
454   #define TYP_KEYWORDS    VT_LPSTR
455   #define TYP_COMMENTS    VT_LPSTR
456   #define TYP_TEMPLATE    VT_LPSTR
457   #define TYP_LASTAUTHOR    VT_LPSTR
458   #define TYP_REV_NUMBER    VT_LPSTR
459   #define TYP_EDITTIME    VT_FILETIME
460   #define TYP_LASTPRINTED   VT_FILETIME
461   #define TYP_CREATE_DTM    VT_FILETIME
462   #define TYP_LASTSAVE_DTM  VT_FILETIME
463   #define TYP_PAGECOUNT   VT_I4
464   #define TYP_WORDCOUNT   VT_I4
465   #define TYP_CHARCOUNT   VT_I4
466   #define TYP_THUMBNAIL   VT_CF
467   #define TYP_APPNAME     VT_LPSTR
468   #define TYP_SECURITY    VT_I4
469 
470   #define MaxThumbNailSize  96      // Maximum wdith or height of thumbnail image
471   #define DefaultPaletteSize  256     // Default size of Palette
472 
473 // Define window DIB structures
474 #if defined(macintosh) || defined(_UNIX)
475 
476   // Bitmap information header
477   typedef struct tagBITMAPINFOHEADER
478   {
479     long      biSize;
480     long      biWidth;
481     long      biHeight;
482     unsigned short  biPlanes;
483     unsigned short  biBitCount;
484     unsigned long biCompression;
485     unsigned long biSizeImage;
486     unsigned long biXPelsPerMeter;
487     unsigned long biYPelsPerMeter;
488     unsigned long biClrUsed;
489     unsigned long biClrImportant;
490   } BITMAPINFOHEADER, FAR *LPBITMAPINFOHEADER, *PBITMAPINFOHEADER;
491 
492   // constants for the biCompression field
493   #define BI_RGB        0L
494   #define BI_RLE8       1L
495   #define BI_RLE4       2L
496   #define BI_BITFIELDS  3L
497 
498   // RGBQUAD structure for palette
499   typedef struct tagRGBQUAD
500   {
501     unsigned char rgbRed;
502     unsigned char rgbGreen;
503     unsigned char rgbBlue;
504     unsigned char rgbReserved;
505   } RGBQUAD;
506 
507 #endif
508 
509   // Global Info Property Set
510 
511 //  #define PID_LockedPropertyList  0x00010002
512 //  #define PID_Title           0x00010003
513 //  #define PID_LastModifier    0x00010004
514   #define PID_VisibleOutputs    0x00010100
515   #define PID_MaxImageIndex   0x00010101
516   #define PID_MaxTransfoIndex   0x00010102
517   #define PID_MaxOperatorIndex  0x00010103
518 
519 //  #define TYP_LockedPropertyList  VT_UI4|VT_VECTOR
520 //  #define TYP_Title       VT_LPWSTR
521 //  #define TYP_LastModifier    VT_LPWTSR
522   #define TYP_VisibleOutputs    VT_UI4|VT_VECTOR
523   #define TYP_MaxImageIndex   VT_UI4
524   #define TYP_MaxTransfoIndex   VT_UI4
525   #define TYP_MaxOperatorIndex  VT_UI4
526 
527   // Extension List Property Set
528   #define PID_UsedExtensionNumber           0x10000000
529   #define PID_ExtensionName(extNumber)        ( extNumber << 16 | 0x00000001 )
530   #define PID_ExtensionClassID(extNumber)       ( extNumber << 16 | 0x00000002 )
531   #define PID_ExtensionPersistence(extNumber)     ( extNumber << 16 | 0x00000003 )
532   #define PID_ExtensionCreationDate(extNumber)    ( extNumber << 16 | 0x00000004 )
533   #define PID_ExtensionModificationDate(extNumber)  ( extNumber << 16 | 0x00000005 )
534   #define PID_CreateApplication(extNumber)      ( extNumber << 16 | 0x00000006 )
535   #define PID_ExtensionDescription(extNumber)     ( extNumber << 16 | 0x00000007 )
536   #define PID_StorageStreamPathName(extNumber)    ( extNumber << 16 | 0x00001000 )
537   #define PID_FPXStreamPathName(extNumber)      ( extNumber << 16 | 0x00002000 )
538   #define PID_FPXStreamFieldOffset(extNumber)     ( extNumber << 16 | 0x00002001 )
539   #define PID_PropertySetPathName(extNumber)      ( extNumber << 16 | 0x00003000 )
540   #define PID_PropertySetFormatID(extNumber)      ( extNumber << 16 | 0x00003001 )
541   #define PID_PropertySetIDCodes(extNumber)     ( extNumber << 16 | 0x00003002 )
542 
543   #define TYP_UsedExtensionNumber           VT_UI2|VT_VECTOR
544   #define TYP_ExtensionName             VT_LPWSTR
545   #define TYP_ExtensionClassID            VT_CLSID
546   #define TYP_ExtensionPersistence          VT_UI2
547   #define TYP_ExtensionCreationDate         VT_FILETIME
548   #define TYP_ExtensionModificationDate       VT_FILETIME
549   #define TYP_CreateApplication           VT_LPWSTR
550   #define TYP_ExtensionDescription          VT_LPWSTR
551   #define TYP_StorageStreamPathName         VT_LPWSTR|VT_VECTOR
552   #define TYP_FPXStreamPathName           VT_LPWSTR|VT_VECTOR
553   #define TYP_FPXStreamFieldOffset          VT_UI4|VT_VECTOR
554   #define TYP_PropertySetPathName           VT_LPWSTR|VT_VECTOR
555   #define TYP_PropertySetFormatID           VT_CLSID|VT_VECTOR
556   #define TYP_PropertySetIDCodes            VT_LPWSTR|VT_VECTOR
557 
558   // Legal Values of subfields:
559   // --------------------------
560 
561   typedef enum {
562     Compress_No       = 0x00,
563     Compress_SingleColor  = 0x01,
564     Compress_JPEG     = 0x02
565 //    Compress_PNG      = 0xFF  // Could be cool for the web...
566   } TypCompression;
567 
568   typedef enum {
569     ColorSpace_Colorless  = 0x0000,
570     ColorSpace_Monochrome = 0x0001,
571     ColorSpace_PhotoYCC   = 0x0002,
572     ColorSpace_NifRGB   = 0x0003,
573     ColorSpace_HSV      = 0x0004,
574     ColorSpace_CIELab   = 0x0005,
575     ColorSpace_CMYK     = 0x0006,
576     ColorSpace_CMY      = 0x0007,
577     ColorSpace_RGB      = 0x0008,
578     ColorSpace_YRB      = 0x0009
579   } TypColorSpace;
580 
581   typedef enum {
582     Color_Monochrome  = 0x0000,
583     Color_Red     = 0x0000,
584     Color_Green     = 0x0001,
585     Color_Blue      = 0x0002,
586     Color_PhotoYCC_Y  = 0x0000,
587     Color_PhotoYCC_C1 = 0x0001,
588     Color_PhotoYCC_C2 = 0x0002,
589     Color_Cyan      = 0x0000,
590     Color_Magenta   = 0x0001,
591     Color_Yellow    = 0x0002,
592     Color_Black     = 0x0003,
593     Color_Unspecified = 0x0000,
594     Color_CIE_L     = 0x0000,
595     Color_CIE_A     = 0x0001,
596     Color_CIE_B     = 0x0002,
597     Color_Hue     = 0x0000,
598     Color_Saturation  = 0x0001,
599     Color_Value     = 0x0002,
600     Color_Unspec_Y    = 0x0000,
601     Color_Unspec_R    = 0x0001,
602     Color_Unspec_B    = 0x0002,
603     Color_Opacity   = 0x7FFE,
604     Color_Depth     = 0x7FFF
605   } TypColor;
606 
607   // Image Contents Property Set: Extract compression information from compression subtype
608   #define GET_InterleaveType(compressionSubtype)    (compressionSubtype & 0x000000FF)
609   #define GET_ChromaSubSample(compressionSubtype)   (compressionSubtype & 0x0000FFFF) >> 8
610   #define GET_InternalColorConv(compressionSubtype) (compressionSubtype & 0x00FFFFFF) >> 16
611   #define GET_JPEGTablesIndex(compressionSubtype)   (compressionSubtype & 0xFFFFFFFF) >> 24
612   #define MAKE_CompressionSubType(Interleave, ChromaSubSample, InternalColor, JPEGTablesIndex )  (JPEGTablesIndex << 24 | InternalColor << 16 | ChromaSubSample << 8 | Interleave )
613   #define SET_JPEGTablesIndex(compressionSubtype, JPEGTablesIndex) ((compressionSubtype & 0x00FFFFFF) | JPEGTablesIndex << 24)
614 
615   // Markers of a JPEG abbreviated format stream
616   #define JPEGStartOfImageMarker  0xFFD8
617   #define JPEGEndOfImageMarker  0xFFD9
618 
619   #define JPEGStartOfQuantizationTable  0xFFDB
620   #define JPEGStartOfHuffmanTable     0xFFC4
621 
622   #define JPEGStartOfFrameMarker  0xFFC0
623   #define JPEGStartOfScanMarker 0xFFDA
624 
625   #define PremultipliedBit  0x00008000
626   #define UncalibratedBit   0x80000000
627 
628   #define MakeColorSpec(colorSpace,color) (long)(((long)(colorSpace)<<16) | (long)(color))
629   #define IsPremultiplied(color)    ((color & PremultipliedBit) != 0)
630   #define SetPremultiplied(color)   color = color |  PremultipliedBit
631   #define UnsetPremultiplied(color) color = color & ~PremultipliedBit
632   #define IsUncalibrated(color)     ((color & UncalibratedBit) != 0)
633   #define SetUncalibrated(color)    color = color |  UncalibratedBit
634   #define UnsetUncalibrated(color)  color = color & ~UncalibratedBit
635   #define ExtractColorSpace(color)  color = color >> 16
636   #define ExtractColorType(color)   color = color & OxFFFF
637 
638   typedef enum {
639     Existence_NotCached = 0x0000,
640     Existence_Cached  = 0x0001
641   } TypExistence;
642 
643   typedef enum {
644     Permission_Purgeable  = 0x0000,
645     Permission_NotPurgeable = 0x0001
646   } TypPermission;
647 
648 //  Functions 'extern'
649 //  ------------------
650 
651 
652   //  BUFFERS MUST BE LONG ENOUGH TO SUPPORT ANY OLE-NAME ... (32 chars)
653   void  GetSummaryInfoName  (char * buffer);
654   void  GetImageContentName (char * buffer);
655   void  GetImageInfoName    (char * buffer);
656   void  GetResolutionName   (char * buffer, unsigned long resNum);
657   void  GetSubImageHdrName  (char * buffer, unsigned long imgNum);
658   void  GetSubImageDataName (char * buffer, unsigned long imgNum);
659   void  GetSupportDataName  (char * buffer, unsigned long imgNum);
660   void  GetICCProfileName (char * buffer, unsigned short imgNum);
661   void  GetCustomLinkName   (char * buffer);
662   void  GetGlobalInfoName (char * buffer);
663   void  GetImageDescName  (char * buffer, unsigned long index);
664   void  GetImageStoreName (char * buffer, unsigned long index);
665   void  GetTransformName  (char * buffer, unsigned long index);
666   void  GetOperationName  (char * buffer, unsigned long index);
667   void  GetExtensionName  (char * buffer);
668 
669 #ifdef macintosh
670   struct GUID;
671 #endif
672 
673 //    GetGuid();
674 
675 //  Variables 'extern'
676 //  ------------------
677 
678 //  ----------------------------------------------------------------------------
679   #endif // FlashPixUtils_h
680 //  ----------------------------------------------------------------------------
681