Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
7.4 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1998
  4. *
  5. * TITLE: WiaTiff.h
  6. *
  7. * VERSION: 2.0
  8. *
  9. * DATE: 28 Aug, 1998
  10. *
  11. * DESCRIPTION:
  12. * Definitions and declarations of TIFF helpers for the WIA class driver.
  13. *
  14. *******************************************************************************/
  15. #pragma pack (push, 4)
  16. #pragma pack (2)
  17. typedef struct _TIFF_FILE_HEADER {
  18. WORD ByteOrder;
  19. WORD Signature;
  20. LONG OffsetIFD;
  21. } TIFF_FILE_HEADER, *PTIFF_FILE_HEADER;
  22. typedef struct _TIFF_DIRECTORY_ENTRY {
  23. WORD Tag;
  24. WORD DataType;
  25. DWORD Count;
  26. DWORD Value;
  27. } TIFF_DIRECTORY_ENTRY, *PTIFF_DIRECTORY_ENTRY;
  28. typedef struct _TIFF_HEADER {
  29. SHORT NumTags;
  30. TIFF_DIRECTORY_ENTRY NewSubfileType;
  31. TIFF_DIRECTORY_ENTRY ImageWidth;
  32. TIFF_DIRECTORY_ENTRY ImageLength;
  33. TIFF_DIRECTORY_ENTRY BitsPerSample;
  34. TIFF_DIRECTORY_ENTRY Compression;
  35. TIFF_DIRECTORY_ENTRY PhotometricInterpretation;
  36. TIFF_DIRECTORY_ENTRY StripOffsets;
  37. TIFF_DIRECTORY_ENTRY RowsPerStrip;
  38. TIFF_DIRECTORY_ENTRY StripByteCounts;
  39. TIFF_DIRECTORY_ENTRY XResolution;
  40. TIFF_DIRECTORY_ENTRY YResolution;
  41. TIFF_DIRECTORY_ENTRY ResolutionUnit;
  42. LONG NextIFD;
  43. LONG XResValue;
  44. LONG XResCount;
  45. LONG YResValue;
  46. LONG YResCount;
  47. } TIFF_HEADER, *PTIFF_HEADER;
  48. #pragma pack (pop, 4)
  49. //
  50. // TIFF date types
  51. //
  52. #define TIFF_TYPE_BYTE 1 // 8-bit unsigned integer.
  53. #define TIFF_TYPE_ASCII 2 // 8-bit byte that contains a 7-bit ASCII code; the last byte
  54. // must be NUL (binary zero).
  55. #define TIFF_TYPE_SHORT 3 // 16-bit (2-byte) unsigned integer.
  56. #define TIFF_TYPE_LONG 4 // LONG 32-bit (4-byte) unsigned integer.
  57. #define TIFF_TYPE_RATIONAL 5 // Two LONGs: the first represents the numerator of a
  58. // fraction; the second, the denominator.
  59. #define TIFF_TYPE_SBYTE 6 // An 8-bit signed (twos-complement) integer.
  60. #define TIFF_TYPE_UNDEFINED 7 // An 8-bit byte that may contain anything, depending on
  61. // the definition of the field.
  62. #define TIFF_TYPE_SSHORT 8 // A 16-bit (2-byte) signed (twos-complement) integer.
  63. #define TIFF_TYPE_SLONG 9 // 32-bit (4-byte) signed (twos-complement) integer.
  64. #define TIFF_TYPE_SRATIONAL 10 // Two SLONG's: the first represents the numerator
  65. // of a fraction, the second the denominator.
  66. #define TIFF_TYPE_FLOAT 11 // Single precision (4-byte) IEEE format.
  67. #define TIFF_TYPE_DOUBLE 12 // Double precision (8-byte) IEEE format.
  68. //
  69. // tiff tags
  70. //
  71. #define TIFF_TAG_NewSubfileType 254
  72. #define TIFF_TAG_SubfileType 255
  73. #define TIFF_TAG_ImageWidth 256
  74. #define TIFF_TAG_ImageLength 257
  75. #define TIFF_TAG_BitsPerSample 258
  76. #define TIFF_TAG_Compression 259
  77. #define TIFF_CMP_Uncompressed 1
  78. #define TIFF_CMP_CCITT_1D 2
  79. #define TIFF_CMP_Group_3_FAX 3
  80. #define TIFF_CMP_Group_4_FAX 4
  81. #define TIFF_CMP_LZW 5
  82. #define TIFF_CMP_JPEG 6
  83. #define TIFF_CMP_PackBits 32773
  84. #define TIFF_TAG_PhotometricInterpretation 262
  85. #define TIFF_PMI_WhiteIsZero 0
  86. #define TIFF_PMI_BlackIsZero 1
  87. #define TIFF_PMI_RGB 2
  88. #define TIFF_PMI_RGB_Palette 3
  89. #define TIFF_PMI_Transparency_mask 4
  90. #define TIFF_PMI_CMYK 5
  91. #define TIFF_PMI_YCbCr 6
  92. #define TIFF_PMI_CIELab 8
  93. #define TIFF_TAG_Threshholding 263
  94. #define TIFF_TAG_CellWidth 264
  95. #define TIFF_TAG_CellLength 265
  96. #define TIFF_TAG_FillOrder 266
  97. #define TIFF_TAG_DocumentName 269
  98. #define TIFF_TAG_ImageDescription 270
  99. #define TIFF_TAG_Make 271
  100. #define TIFF_TAG_Model 272
  101. #define TIFF_TAG_StripOffsets 273
  102. #define TIFF_TAG_Orientation 274
  103. #define TIFF_TAG_SamplesPerPixel 277
  104. #define TIFF_TAG_RowsPerStrip 278
  105. #define TIFF_TAG_StripByteCounts 279
  106. #define TIFF_TAG_MinSampleValue 280
  107. #define TIFF_TAG_MaxSampleValue 281
  108. #define TIFF_TAG_XResolution 282
  109. #define TIFF_TAG_YResolution 283
  110. #define TIFF_TAG_PlanarConfiguration 284
  111. #define TIFF_TAG_PageName 285
  112. #define TIFF_TAG_XPosition 286
  113. #define TIFF_TAG_YPosition 287
  114. #define TIFF_TAG_FreeOffsets 288
  115. #define TIFF_TAG_FreeByteCounts 289
  116. #define TIFF_TAG_GrayResponseUnit 290
  117. #define TIFF_TAG_GrayResponseCurve 291
  118. #define TIFF_TAG_T4Options 292
  119. #define TIFF_TAG_T6Options 293
  120. #define TIFF_TAG_ResolutionUnit 296
  121. #define TIFF_TAG_PageNumber 297
  122. #define TIFF_TAG_TransferFunction 301
  123. #define TIFF_TAG_Software 305
  124. #define TIFF_TAG_DateTime 306
  125. #define TIFF_TAG_Artist 315
  126. #define TIFF_TAG_HostComputer 316
  127. #define TIFF_TAG_Predictor 317
  128. #define TIFF_TAG_WhitePoint 318
  129. #define TIFF_TAG_PrimaryChromaticities 319
  130. #define TIFF_TAG_ColorMap 320
  131. #define TIFF_TAG_HalftoneHints 321
  132. #define TIFF_TAG_TileWidth 322
  133. #define TIFF_TAG_TileLength 323
  134. #define TIFF_TAG_TileOffsets 324
  135. #define TIFF_TAG_TileByteCounts 325
  136. #define TIFF_TAG_InkSet 332
  137. #define TIFF_TAG_InkNames 333
  138. #define TIFF_TAG_NumberOfInks 334
  139. #define TIFF_TAG_DotRange 336
  140. #define TIFF_TAG_TargetPrinter 337
  141. #define TIFF_TAG_SampleFormat 339
  142. #define TIFF_TAG_SMinSampleValue 340
  143. #define TIFF_TAG_SMaxSampleValue 341
  144. #define TIFF_TAG_TransferRange 342
  145. #define TIFF_TAG_JPEGProc 512
  146. #define TIFF_TAG_JPEGInterchangeFormat 513
  147. #define TIFF_TAG_JPEGInterchangeFormatLngth 514
  148. #define TIFF_TAG_JPEGRestartInterval 515
  149. #define TIFF_TAG_JPEGLosslessPredictors 517
  150. #define TIFF_TAG_JPEGPointTransforms 518
  151. #define TIFF_TAG_JPEGQTables 519
  152. #define TIFF_TAG_JPEGDCTables 520
  153. #define TIFF_TAG_JPEGACTables 521
  154. #define TIFF_TAG_YCbCrCoefficients 529
  155. #define TIFF_TAG_YCbCrSubSampling 530
  156. #define TIFF_TAG_YCbCrPositioning 531
  157. #define TIFF_TAG_ReferenceBlackWhite 532
  158. #define TIFF_TAG_Copyright 33432
  159. //
  160. // Prototypes
  161. //
  162. HRESULT _stdcall GetTIFFImageInfo(PMINIDRV_TRANSFER_CONTEXT);
  163. HRESULT _stdcall GetMultiPageTIFFImageInfo(PMINIDRV_TRANSFER_CONTEXT);
  164. HRESULT _stdcall WritePageToMultiPageTiff(PMINIDRV_TRANSFER_CONTEXT);