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