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.

106 lines
3.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1997 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // jpeg.h - jpeg compression and decompression functions
  24. ////
  25. #ifndef __JPEG_H__
  26. #define __JPEG_H__
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. #include "winlocal.h"
  31. #define JPEG_VERSION 0x00000100
  32. #define JPEG_COMPRESS 0x00000001
  33. #define JPEG_DECOMPRESS 0x00000002
  34. #define JPEG_GREYSCALE 0x00000004
  35. #define JPEG_FLOAT 0x00000008
  36. #define JPEG_DEBUG 0x00000010
  37. #define JPEG_OPTIMIZE 0x00000020
  38. #define JPEG_PROGRESSIVE 0x00000040
  39. #define JPEG_DESTGIF 0x00000080
  40. #define JPEG_DESTBMP 0x00000100
  41. // handle to jpeg engine
  42. //
  43. DECLARE_HANDLE32(HJPEG);
  44. // JpegInit - initialize jpeg engine
  45. // <dwVersion> (i) must be JPEG_VERSION
  46. // <hInst> (i) instance handle of calling module
  47. // <dwFlags> (i) control flags
  48. // JPEG_COMPRESS compresssion needed
  49. // JPEG_DECOMPRESS decompresssion needed
  50. // return handle (NULL if error)
  51. //
  52. HJPEG DLLEXPORT WINAPI JpegInit(DWORD dwVersion, HINSTANCE hInst, DWORD dwFlags);
  53. // JpegTerm - shut down jpeg engine
  54. // <hJpeg> (i) handle returned from JpegInit
  55. // return 0 if success
  56. //
  57. int DLLEXPORT WINAPI JpegTerm(HJPEG hJpeg);
  58. // JpegCompress - compress BMP or GIF input file to JPEG output file
  59. // <hJpeg> (i) handle returned from JpegInit
  60. // <lpszSrc> (i) name of input file
  61. // <lpszDst> (i) name of output file
  62. // <nQuality> (i) compression quality (0..100; 5-95 is useful range)
  63. // -1 default quality
  64. // <lParam> (i) reserved; must be NULL
  65. // <dwFlags> (i) control flags
  66. // JPEG_GREYSCALE force monochrome output
  67. // JPEG_FLOAT use floating point computation
  68. // JPEG_DEBUG emit verbose debug output
  69. // JPEG_OPTIMIZE smaller file, slower compression
  70. // JPEG_PROGRESSIVE create progressive JPEG output
  71. // return 0 if success
  72. //
  73. int DLLEXPORT WINAPI JpegCompress(HJPEG hJpeg, LPCTSTR lpszSrc, LPCTSTR lpszDst, int nQuality, LPCTSTR lParam, DWORD dwFlags);
  74. // JpegDecompress - decompress JPEG input file to BMP or GIF output file
  75. // <hJpeg> (i) handle returned from JpegInit
  76. // <lpszSrc> (i) name of input file
  77. // <lpszDst> (i) name of output file
  78. // <nColors> (i) restrict image to no more than <nColor>
  79. // -1 no restriction
  80. // <lParam> (i) reserved; must be NULL
  81. // <dwFlags> (i) control flags
  82. // JPEG_GREYSCALE force monochrome output
  83. // JPEG_FLOAT use floating point computation
  84. // JPEG_DEBUG emit verbose debug output
  85. // JPEG_DESTBMP destination file is BMP format (default)
  86. // JPEG_DESTGIF destination file is GIF format
  87. // return 0 if success
  88. //
  89. int DLLEXPORT WINAPI JpegDecompress(HJPEG hJpeg, LPCTSTR lpszSrc, LPCTSTR lpszDst, short nColors, LPCTSTR lParam, DWORD dwFlags);
  90. #ifdef __cplusplus
  91. }
  92. #endif
  93. #endif // __JPEG_H__