ilu.inc 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. '-----------------------------------------------------------------------------
  2. '
  3. ' ImageLib Utility Sources
  4. ' Copyright (C) 2000-2002 by Denton Woods
  5. ' Last modified: 06/22/2002 <--Y2K Compliant! =]
  6. '
  7. ' Filename: il/ilu.h
  8. '
  9. ' Description: The main include file for OpenILU
  10. '
  11. '-----------------------------------------------------------------------------
  12. '-----------------------------------------------------------------------------
  13. '
  14. ' Translated to Powerbasic by Peter Scheutz, Scheutz & Clementsen Design
  15. ' Web: http://www.scheutz.dk
  16. ' e-mail: sourcecode@scheutz.dk
  17. '
  18. ' Last modified: 06/22/2002
  19. ' Based on DevIL Ver. 1.6.1 headers
  20. '
  21. ' Filename: ilu.inc
  22. '
  23. ' Description: PB main include file for OpenILU
  24. '
  25. ' For information on use and download of OpenIL goto: http://openil.sourceforge.net/
  26. ' (Get docs and "End User Package")
  27. '
  28. ' Report errors in the Powerbasic includes to e-mail above.
  29. '
  30. ' For general help on Powerbasic and OpenIL, try the forums at:
  31. ' http://www.powerbasic.com
  32. '-----------------------------------------------------------------------------
  33. ' #ifndef __ilu_h_
  34. ' #ifndef __ILU_H__
  35. ' %__ilu_h_
  36. ' %__ILU_H__
  37. ' #include <il/il.h>
  38. ' #ifdef __cplusplus
  39. ' extern "C" {
  40. ' #endif
  41. ' #ifdef _WIN32
  42. ' #ifdef _MSC_VER
  43. ' #ifndef _ILU_BUILD_LIBRARY
  44. ' #ifdef _DEBUG
  45. ' #pragma comment(lib, "ilu-d.lib")
  46. ' #else
  47. ' #pragma comment(lib, "ilu.lib")
  48. ' #endif'_DEBUG
  49. ' #endif'_ILU_BUILD_LIBRARY
  50. ' #endif'_MSC_VER
  51. ' #endif'_WIN32
  52. %ILU_VERSION_1_5_6 = 1
  53. %ILU_VERSION = 156
  54. %ILU_FILTER = &H2600&
  55. %ILU_NEAREST = &H2601&
  56. %ILU_LINEAR = &H2602&
  57. %ILU_BILINEAR = &H2603&
  58. %ILU_SCALE_BOX = &H2604&
  59. %ILU_SCALE_TRIANGLE = &H2605&
  60. %ILU_SCALE_BELL = &H2606&
  61. %ILU_SCALE_BSPLINE = &H2607&
  62. %ILU_SCALE_LANCZOS3 = &H2608&
  63. %ILU_SCALE_MITCHELL = &H2609&
  64. ' Error types
  65. %ILU_INVALID_ENUM = &H0501&
  66. %ILU_OUT_OF_MEMORY = &H0502&
  67. %ILU_INTERNAL_ERROR = &H0504&
  68. %ILU_INVALID_VALUE = &H0505&
  69. %ILU_ILLEGAL_OPERATION = &H0506&
  70. %ILU_INVALID_PARAM = &H0509&
  71. ' Values
  72. %ILU_PLACEMENT = &H0700&
  73. %ILU_LOWER_LEFT = &H0701&
  74. %ILU_LOWER_RIGHT = &H0702&
  75. %ILU_UPPER_LEFT = &H0703&
  76. %ILU_UPPER_RIGHT = &H0704&
  77. %ILU_CENTER = &H0705&
  78. %ILU_CONVOLUTION_MATRIX = &H0710&
  79. %ILU_VERSION_NUM = &H0DE2&
  80. ' Filters
  81. %ILU_FILTER_BLUR = &H0803&
  82. %ILU_FILTER_GAUSSIAN_3x3 = &H0804&
  83. %ILU_FILTER_GAUSSIAN_5X5 = &H0805&
  84. %ILU_FILTER_EMBOSS1 = &H0807&
  85. %ILU_FILTER_EMBOSS2 = &H0808&
  86. %ILU_FILTER_LAPLACIAN1 = &H080A&
  87. %ILU_FILTER_LAPLACIAN2 = &H080B&
  88. %ILU_FILTER_LAPLACIAN3 = &H080C&
  89. %ILU_FILTER_LAPLACIAN4 = &H080D&
  90. %ILU_FILTER_SHARPEN1 = &H080E&
  91. %ILU_FILTER_SHARPEN2 = &H080F&
  92. %ILU_FILTER_SHARPEN3 = &H0810&
  93. ' typedef struct ILinfo
  94. Type ILinfo Dword
  95. iId As Dword'ILuint Id; ' the image's id
  96. iData As Dword '(should this be Byte Ptr? )'ILubyte *Data; ' the image's data
  97. iWidth As Dword 'ILuint Width; ' the image's width
  98. iHeight As Dword 'ILuint Height; ' the image's height
  99. iDepth As Dword 'ILuint Depth; ' the image's depth
  100. iBpp As Byte'ILubyte Bpp; ' bytes per pixel (not bits) of the image
  101. iSizeOfData As Dword 'ILuint SizeOfData; ' the total size of the data (in bytes)
  102. iFormat As Dword 'ILenum Format; ' image format (in IL enum style)
  103. iType As Dword 'ILenum Type; ' image type (in IL enum style)
  104. iOrigin As Dword 'ILenum Origin; ' origin of the image
  105. iPalette As Long 'ILubyte *Palette; ' the image's palette
  106. iPalType As Dword 'ILenum PalType; ' palette type
  107. iPalSize As Dword 'ILuint PalSize; ' palette size
  108. iNumNext As Dword'ILuint NumNext; ' number of images following
  109. iNumMips As Dword 'ILuint NumMips; ' number of mipmaps
  110. iNumLayers As Dword'ILuint NumLayers; ' number of layers
  111. End Type
  112. ' ImageLib Utility Functions
  113. Declare Function iluAlienify Lib "ilu.dll" Alias "iluAlienify" () As Byte
  114. Declare Function iluApplyProfile Lib "ilu.dll" Alias "iluApplyProfile" (ByRef pb_InProfile As Asciiz, ByRef pb_OutProfile As Asciiz) As Byte
  115. Declare Function iluBlurAvg Lib "ilu.dll" Alias "iluBlurAvg" (ByVal pb_Iter As Dword) As Byte
  116. Declare Function iluBlurGaussian Lib "ilu.dll" Alias "iluBlurGaussian" (ByVal pb_Iter As Dword) As Byte
  117. Declare Function iluBuildMipmaps Lib "ilu.dll" Alias "iluBuildMipmaps" () As Byte
  118. Declare Function iluColoursUsed Lib "ilu.dll" Alias "iluColoursUsed" () As Dword
  119. Declare Function iluCompareImage Lib "ilu.dll" Alias "iluCompareImage" (ByVal pb_Comp As Dword) As Byte
  120. Declare Function iluContrast Lib "ilu.dll" Alias "iluContrast" (ByVal pb_Contrast As Single) As Byte
  121. Declare Function iluCrop Lib "ilu.dll" Alias "iluCrop" (ByVal pb_XOff As Dword, ByVal pb_YOff As Dword, ByVal pb_ZOff As Dword, ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword) As Byte
  122. Declare Sub iluDeleteImage Lib "ilu.dll" Alias "iluDeleteImage" (ByVal pb_Id As Dword)
  123. Declare Function iluEdgeDetectE Lib "ilu.dll" Alias "iluEdgeDetectE" () As Byte
  124. Declare Function iluEdgeDetectP Lib "ilu.dll" Alias "iluEdgeDetectP" () As Byte
  125. Declare Function iluEdgeDetectS Lib "ilu.dll" Alias "iluEdgeDetectS" () As Byte
  126. Declare Function iluEmboss Lib "ilu.dll" Alias "iluEmboss" () As Byte
  127. Declare Function iluEnlargeCanvas Lib "ilu.dll" Alias "iluEnlargeCanvas" (ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword) As Byte
  128. Declare Function iluEnlargeImage Lib "ilu.dll" Alias "iluEnlargeImage" (ByVal pb_XDim As Single, ByVal pb_YDim As Single, ByVal pb_ZDim As Single) As Byte
  129. Declare Function iluEqualize Lib "ilu.dll" Alias "iluEqualize" () As Byte
  130. Declare Function iluErrorString Lib "ilu.dll" Alias "iluErrorString" (ByVal pb_Error As Dword) As String
  131. Declare Function iluFlipImage Lib "ilu.dll" Alias "iluFlipImage" () As Byte
  132. Declare Function iluGammaCorrect Lib "ilu.dll" Alias "iluGammaCorrect" (ByVal pb_Gamma As Single) As Byte
  133. Declare Function iluGenImage Lib "ilu.dll" Alias "iluGenImage" () As Dword
  134. Declare Sub iluGetImageInfo Lib "ilu.dll" Alias "iluGetImageInfo" (ByRef pb_Info As ILinfo)
  135. Declare Function iluGetInteger Lib "ilu.dll" Alias "iluGetInteger" (ByVal pb_Mode As Dword) As Long
  136. Declare Sub iluGetIntegerv Lib "ilu.dll" Alias "iluGetIntegerv" (ByVal pb_Mode As Dword, ByRef pb_Param As Long)
  137. Declare Function iluGetString Lib "ilu.dll" Alias "iluGetString" (ByVal pb_StringName As Dword) As String
  138. Declare Sub iluInit Lib "ilu.dll" Alias "iluInit" ()
  139. Declare Function iluInvertAlpha Lib "ilu.dll" Alias "iluInvertAlpha" () As Byte
  140. Declare Function iluLoadImage Lib "ilu.dll" Alias "iluLoadImage" (ByRef pb_FileName As Asciiz) As Dword
  141. Declare Sub iluImageParameter Lib "ilu.dll" Alias "iluImageParameter" (ByVal pb_PName As Dword, ByVal pb_Param As Dword)
  142. Declare Function iluMirror Lib "ilu.dll" Alias "iluMirror" () As Byte
  143. Declare Function iluNegative Lib "ilu.dll" Alias "iluNegative" () As Byte
  144. Declare Function iluNoisify Lib "ilu.dll" Alias "iluNoisify" (ByVal pb_Tolerance As Single) As Byte
  145. Declare Function iluPixelize Lib "ilu.dll" Alias "iluPixelize" (ByVal pb_PixSize As Dword) As Byte
  146. 'Declare Sub iluRegionf Lib "ilu.dll" Alias "iluRegionf" (ByVal pb_ULx As Single, ByVal pb_ULy As Single, ByVal pb_BRx As Single, ByVal pb_BRy As Single)
  147. 'Declare Sub iluRegioni Lib "ilu.dll" Alias "iluRegioni" (ByVal pb_ULx As Dword, ByVal pb_ULy As Dword, ByVal pb_BRx As Dword, ByVal pb_BRy As Dword)
  148. Declare Function iluReplaceColour Lib "ilu.dll" Alias "iluReplaceColour" (ByVal pb_Red As Byte, ByVal pb_Green As Byte, ByVal pb_Blue As Byte, ByVal pb_Tolerance As Single) As Byte
  149. Declare Function iluRotate Lib "ilu.dll" Alias "iluRotate" (ByVal pb_Angle As Single) As Byte
  150. Declare Function iluRotate3D Lib "ilu.dll" Alias "iluRotate3D" (ByVal pb_x As Single, ByVal pb_y As Single, ByVal pb_z As Single, ByVal pb_Angle As Single) As Byte
  151. Declare Function iluSaturate1f Lib "ilu.dll" Alias "iluSaturate1f" (ByVal pb_Saturation As Single) As Byte
  152. Declare Function iluSaturate4f Lib "ilu.dll" Alias "iluSaturate4f" (ByVal pb_r As Single, ByVal pb_g As Single, ByVal pb_b As Single, ByVal pb_Saturation As Single) As Byte
  153. Declare Function iluScale Lib "ilu.dll" Alias "iluScale" (ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword) As Byte
  154. Declare Function iluScaleColours Lib "ilu.dll" Alias "iluScaleColours" (ByVal pb_r As Single, ByVal pb_g As Single, ByVal pb_b As Single) As Byte
  155. Declare Function iluSharpen Lib "ilu.dll" Alias "iluSharpen" (ByVal pb_Factor As Single, ByVal pb_Iter As Dword) As Byte
  156. Declare Function iluSwapColours Lib "ilu.dll" Alias "iluSwapColours" () As Byte
  157. Declare Function iluWave Lib "ilu.dll" Alias "iluWave" (ByVal pb_Angle As Single) As Byte
  158. '%iluColorsUsed = iluColoursUsed
  159. '%iluSwapColors = iluSwapColours
  160. ' #ifdef __cplusplus
  161. ' }
  162. ' #endif
  163. ' #endif /* __ILU_H__ */
  164. ' #endif /* __ilu_h_ */