ilu.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. //-----------------------------------------------------------------------------
  2. //
  3. // ImageLib Utility Sources
  4. // Copyright (C) 2000-2009 by Denton Woods
  5. // Last modified: 03/07/2009
  6. //
  7. // Filename: IL/ilu.h
  8. //
  9. // Description: The main include file for ILU
  10. //
  11. //-----------------------------------------------------------------------------
  12. // Doxygen comment
  13. /*! \file ilu.h
  14. The main include file for ILU
  15. */
  16. #ifndef __ilu_h_
  17. #ifndef __ILU_H__
  18. #define __ilu_h_
  19. #define __ILU_H__
  20. #include <IL/il.h>
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #ifdef _WIN32
  25. #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
  26. #if defined(_MSC_VER) || defined(__BORLANDC__)
  27. #pragma comment(lib, "ILU.lib")
  28. #endif
  29. #endif
  30. #endif
  31. #define ILU_VERSION_1_7_8 1
  32. #define ILU_VERSION 178
  33. #define ILU_FILTER 0x2600
  34. #define ILU_NEAREST 0x2601
  35. #define ILU_LINEAR 0x2602
  36. #define ILU_BILINEAR 0x2603
  37. #define ILU_SCALE_BOX 0x2604
  38. #define ILU_SCALE_TRIANGLE 0x2605
  39. #define ILU_SCALE_BELL 0x2606
  40. #define ILU_SCALE_BSPLINE 0x2607
  41. #define ILU_SCALE_LANCZOS3 0x2608
  42. #define ILU_SCALE_MITCHELL 0x2609
  43. // Error types
  44. #define ILU_INVALID_ENUM 0x0501
  45. #define ILU_OUT_OF_MEMORY 0x0502
  46. #define ILU_INTERNAL_ERROR 0x0504
  47. #define ILU_INVALID_VALUE 0x0505
  48. #define ILU_ILLEGAL_OPERATION 0x0506
  49. #define ILU_INVALID_PARAM 0x0509
  50. // Values
  51. #define ILU_PLACEMENT 0x0700
  52. #define ILU_LOWER_LEFT 0x0701
  53. #define ILU_LOWER_RIGHT 0x0702
  54. #define ILU_UPPER_LEFT 0x0703
  55. #define ILU_UPPER_RIGHT 0x0704
  56. #define ILU_CENTER 0x0705
  57. #define ILU_CONVOLUTION_MATRIX 0x0710
  58. #define ILU_VERSION_NUM IL_VERSION_NUM
  59. #define ILU_VENDOR IL_VENDOR
  60. // Languages
  61. #define ILU_ENGLISH 0x0800
  62. #define ILU_ARABIC 0x0801
  63. #define ILU_DUTCH 0x0802
  64. #define ILU_JAPANESE 0x0803
  65. #define ILU_SPANISH 0x0804
  66. #define ILU_GERMAN 0x0805
  67. #define ILU_FRENCH 0x0806
  68. // Filters
  69. /*
  70. #define ILU_FILTER_BLUR 0x0803
  71. #define ILU_FILTER_GAUSSIAN_3x3 0x0804
  72. #define ILU_FILTER_GAUSSIAN_5X5 0x0805
  73. #define ILU_FILTER_EMBOSS1 0x0807
  74. #define ILU_FILTER_EMBOSS2 0x0808
  75. #define ILU_FILTER_LAPLACIAN1 0x080A
  76. #define ILU_FILTER_LAPLACIAN2 0x080B
  77. #define ILU_FILTER_LAPLACIAN3 0x080C
  78. #define ILU_FILTER_LAPLACIAN4 0x080D
  79. #define ILU_FILTER_SHARPEN1 0x080E
  80. #define ILU_FILTER_SHARPEN2 0x080F
  81. #define ILU_FILTER_SHARPEN3 0x0810
  82. */
  83. typedef struct ILinfo
  84. {
  85. ILuint Id; // the image's id
  86. ILubyte *Data; // the image's data
  87. ILuint Width; // the image's width
  88. ILuint Height; // the image's height
  89. ILuint Depth; // the image's depth
  90. ILubyte Bpp; // bytes per pixel (not bits) of the image
  91. ILuint SizeOfData; // the total size of the data (in bytes)
  92. ILenum Format; // image format (in IL enum style)
  93. ILenum Type; // image type (in IL enum style)
  94. ILenum Origin; // origin of the image
  95. ILubyte *Palette; // the image's palette
  96. ILenum PalType; // palette type
  97. ILuint PalSize; // palette size
  98. ILenum CubeFlags; // flags for what cube map sides are present
  99. ILuint NumNext; // number of images following
  100. ILuint NumMips; // number of mipmaps
  101. ILuint NumLayers; // number of layers
  102. } ILinfo;
  103. typedef struct ILpointf {
  104. ILfloat x;
  105. ILfloat y;
  106. } ILpointf;
  107. typedef struct ILpointi {
  108. ILint x;
  109. ILint y;
  110. } ILpointi;
  111. ILAPI ILboolean ILAPIENTRY iluAlienify(void);
  112. ILAPI ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter);
  113. ILAPI ILboolean ILAPIENTRY iluBlurGaussian(ILuint Iter);
  114. ILAPI ILboolean ILAPIENTRY iluBuildMipmaps(void);
  115. ILAPI ILuint ILAPIENTRY iluColoursUsed(void);
  116. ILAPI ILboolean ILAPIENTRY iluCompareImage(ILuint Comp);
  117. ILAPI ILboolean ILAPIENTRY iluContrast(ILfloat Contrast);
  118. ILAPI ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth);
  119. ILAPI void ILAPIENTRY iluDeleteImage(ILuint Id); // Deprecated
  120. ILAPI ILboolean ILAPIENTRY iluEdgeDetectE(void);
  121. ILAPI ILboolean ILAPIENTRY iluEdgeDetectP(void);
  122. ILAPI ILboolean ILAPIENTRY iluEdgeDetectS(void);
  123. ILAPI ILboolean ILAPIENTRY iluEmboss(void);
  124. ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint Width, ILuint Height, ILuint Depth);
  125. ILAPI ILboolean ILAPIENTRY iluEnlargeImage(ILfloat XDim, ILfloat YDim, ILfloat ZDim);
  126. ILAPI ILboolean ILAPIENTRY iluEqualize(void);
  127. ILAPI ILconst_string ILAPIENTRY iluErrorString(ILenum Error);
  128. ILAPI ILboolean ILAPIENTRY iluConvolution(ILint *matrix, ILint scale, ILint bias);
  129. ILAPI ILboolean ILAPIENTRY iluFlipImage(void);
  130. ILAPI ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma);
  131. ILAPI ILuint ILAPIENTRY iluGenImage(void); // Deprecated
  132. ILAPI void ILAPIENTRY iluGetImageInfo(ILinfo *Info);
  133. ILAPI ILint ILAPIENTRY iluGetInteger(ILenum Mode);
  134. ILAPI void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param);
  135. ILAPI ILstring ILAPIENTRY iluGetString(ILenum StringName);
  136. ILAPI void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param);
  137. ILAPI void ILAPIENTRY iluInit(void);
  138. ILAPI ILboolean ILAPIENTRY iluInvertAlpha(void);
  139. ILAPI ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName);
  140. ILAPI ILboolean ILAPIENTRY iluMirror(void);
  141. ILAPI ILboolean ILAPIENTRY iluNegative(void);
  142. ILAPI ILboolean ILAPIENTRY iluNoisify(ILclampf Tolerance);
  143. ILAPI ILboolean ILAPIENTRY iluPixelize(ILuint PixSize);
  144. ILAPI void ILAPIENTRY iluRegionfv(ILpointf *Points, ILuint n);
  145. ILAPI void ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n);
  146. ILAPI ILboolean ILAPIENTRY iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance);
  147. ILAPI ILboolean ILAPIENTRY iluRotate(ILfloat Angle);
  148. ILAPI ILboolean ILAPIENTRY iluRotate3D(ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
  149. ILAPI ILboolean ILAPIENTRY iluSaturate1f(ILfloat Saturation);
  150. ILAPI ILboolean ILAPIENTRY iluSaturate4f(ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation);
  151. ILAPI ILboolean ILAPIENTRY iluScale(ILuint Width, ILuint Height, ILuint Depth);
  152. ILAPI ILboolean ILAPIENTRY iluScaleAlpha(ILfloat scale);
  153. ILAPI ILboolean ILAPIENTRY iluScaleColours(ILfloat r, ILfloat g, ILfloat b);
  154. ILAPI ILboolean ILAPIENTRY iluSetLanguage(ILenum Language);
  155. ILAPI ILboolean ILAPIENTRY iluSharpen(ILfloat Factor, ILuint Iter);
  156. ILAPI ILboolean ILAPIENTRY iluSwapColours(void);
  157. ILAPI ILboolean ILAPIENTRY iluWave(ILfloat Angle);
  158. #define iluColorsUsed iluColoursUsed
  159. #define iluSwapColors iluSwapColours
  160. #define iluReplaceColor iluReplaceColour
  161. #define iluScaleColor iluScaleColour
  162. #ifdef __cplusplus
  163. }
  164. #endif
  165. #endif // __ILU_H__
  166. #endif // __ilu_h_