source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/demos/Standalone/Hierarchical Systems Demo [OpenGL]/RESOURCES/include/IL/ilu.h @ 3255

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