Source code of Windows XP (NT5)
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.

96 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. test.h
  5. Abstract:
  6. This file is the private header file for the
  7. TIFF test program. All source files in this
  8. program include this header only.
  9. Environment:
  10. WIN32 User Mode
  11. Author:
  12. Wesley Witt (wesw) 17-Feb-1996
  13. --*/
  14. #include <windows.h>
  15. #include <shellapi.h>
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #include <string.h>
  19. #include <tchar.h>
  20. #include "tifflib.h"
  21. #include "faxutil.h"
  22. #include "tiff.h"
  23. #define Align(p, x) (((x) & ((p)-1)) ? (((x) & ~((p)-1)) + p) : (x))
  24. #pragma pack(1)
  25. typedef struct _WINRGBQUAD {
  26. BYTE rgbBlue; // Blue Intensity Value
  27. BYTE rgbGreen; // Green Intensity Value
  28. BYTE rgbRed; // Red Intensity Value
  29. BYTE rgbReserved; // Reserved (should be 0)
  30. } WINRGBQUAD, *PWINRGBQUAD;
  31. typedef struct _BMPINFO {
  32. WORD Type; // File Type Identifier
  33. DWORD FileSize; // Size of File
  34. WORD Reserved1; // Reserved (should be 0)
  35. WORD Reserved2; // Reserved (should be 0)
  36. DWORD Offset; // Offset to bitmap data
  37. DWORD Size; // Size of Remianing Header
  38. DWORD Width; // Width of Bitmap in Pixels
  39. DWORD Height; // Height of Bitmap in Pixels
  40. WORD Planes; // Number of Planes
  41. WORD BitCount; // Bits Per Pixel
  42. DWORD Compression; // Compression Scheme (0=none)
  43. DWORD SizeImage; // Size of bitmap in bytes
  44. DWORD XPelsPerMeter; // Horz. Resolution in Pixels/Meter
  45. DWORD YPelsPerMeter; // Vert. Resolution in Pixels/Meter
  46. DWORD ClrUsed; // Number of Colors in Color Table
  47. DWORD ClrImportant; // Number of Important Colors
  48. } BMPINFO, *UNALIGNED PBMPINFO;
  49. #pragma pack()
  50. //
  51. // prototypes
  52. //
  53. DWORD
  54. ConvertBmpToTiff(
  55. LPTSTR BmpFile,
  56. LPTSTR TiffFile,
  57. DWORD CompressionType
  58. );
  59. DWORD
  60. ConvertTiffToBmp(
  61. LPTSTR TiffFile,
  62. LPTSTR BmpFile
  63. );
  64. VOID
  65. PostProcessTiffFile(
  66. LPTSTR TiffFile
  67. );
  68. BOOL
  69. TiffPreProcess(
  70. LPTSTR FileName,
  71. DWORD CompressionType
  72. );