# E:/DevIL/include/IL/il.h File Reference

`#include <stdio.h>`
`#include <limits.h>`

Go to the source code of this file.

## Defines

#define | __il_h_
#define | __IL_H__
#define | CLAMP_HALF 1
#define | CLAMP_FLOATS 1
#define | CLAMP_DOUBLES 1
#define | RESTRICT
#define | CONST_RESTRICT const
#define | ILchar char
#define | ILstring char*
#define | ILconst_string char const *
#define | IL_FALSE 0
#define | IL_TRUE 1
#define | IL_COLOUR_INDEX 0x1900
| Data formats Formats.
#define | IL_COLOR_INDEX 0x1900
#define | IL_ALPHA 0x1906
#define | IL_RGB 0x1907
#define | IL_RGBA 0x1908
#define | IL_BGR 0x80E0
#define | IL_BGRA 0x80E1
#define | IL_LUMINANCE 0x1909
#define | IL_LUMINANCE_ALPHA 0x190A
#define | IL_BYTE 0x1400
| Data types Types.
#define | IL_UNSIGNED_BYTE 0x1401
#define | IL_SHORT 0x1402
#define | IL_UNSIGNED_SHORT 0x1403
#define | IL_INT 0x1404
#define | IL_UNSIGNED_INT 0x1405
#define | IL_FLOAT 0x1406
#define | IL_DOUBLE 0x140A
#define | IL_HALF 0x140B
#define | IL_MAX_BYTE SCHAR_MAX
#define | IL_MAX_UNSIGNED_BYTE UCHAR_MAX
#define | IL_MAX_SHORT SHRT_MAX
#define | IL_MAX_UNSIGNED_SHORT USHRT_MAX
#define | IL_MAX_INT INT_MAX
#define | IL_MAX_UNSIGNED_INT UINT_MAX
#define | IL_LIMIT(x, m, M) (x<m?m:(x>M?M:x))
#define | IL_CLAMP(x) IL_LIMIT(x,0,1)
#define | IL_VENDOR 0x1F00
#define | IL_LOAD_EXT 0x1F01
#define | IL_SAVE_EXT 0x1F02
#define | IL_VERSION_1_7_5 1
#define | IL_VERSION 175
#define | IL_ORIGIN_BIT 0x00000001
#define | IL_FILE_BIT 0x00000002
#define | IL_PAL_BIT 0x00000004
#define | IL_FORMAT_BIT 0x00000008
#define | IL_TYPE_BIT 0x00000010
#define | IL_COMPRESS_BIT 0x00000020
#define | IL_LOADFAIL_BIT 0x00000040
#define | IL_FORMAT_SPECIFIC_BIT 0x00000080
#define | IL_ALL_ATTRIB_BITS 0x000FFFFF
#define | IL_PAL_NONE 0x0400
#define | IL_PAL_RGB24 0x0401
#define | IL_PAL_RGB32 0x0402
#define | IL_PAL_RGBA32 0x0403
#define | IL_PAL_BGR24 0x0404
#define | IL_PAL_BGR32 0x0405
#define | IL_PAL_BGRA32 0x0406
#define | IL_TYPE_UNKNOWN 0x0000
#define | IL_BMP 0x0420
| Microsoft Windows Bitmap - .bmp extension.
#define | IL_CUT 0x0421
| Dr. Halo - .cut extension.
#define | IL_DOOM 0x0422
| DooM walls - no specific extension.
#define | IL_DOOM_FLAT 0x0423
| DooM flats - no specific extension.
#define | IL_ICO 0x0424
| Microsoft Windows Icons and Cursors - .ico and .cur extensions.
#define | IL_JPG 0x0425
| JPEG - .jpg, .jpe and .jpeg extensions.
#define | IL_JFIF 0x0425
#define | IL_LBM 0x0426
| Interlaced bitmap - .lbm extension.
#define | IL_PCD 0x0427
| Kodak PhotoCD - .pcd extension.
#define | IL_PCX 0x0428
| ZSoft PCX - .pcx extension.
#define | IL_PIC 0x0429
| PIC - .pic extension.
#define | IL_PNG 0x042A
| Portable Network Graphics - .png extension.
#define | IL_PNM 0x042B
| Portable Any Map - .pbm, .pgm, .ppm and .pnm extensions.
#define | IL_SGI 0x042C
| Silicon Graphics - .sgi, .bw, .rgb and .rgba extensions.
#define | IL_TGA 0x042D
| TrueVision Targa File - .tga, .vda, .icb and .vst extensions.
#define | IL_TIF 0x042E
| Tagged Image File Format - .tif and .tiff extensions.
#define | IL_CHEAD 0x042F
| C-Style Header - .h extension.
#define | IL_RAW 0x0430
| Raw Image Data - any extension.
#define | IL_MDL 0x0431
| Half-Life Model Texture - .mdl extension.
#define | IL_WAL 0x0432
| Quake 2 Texture - .wal extension.
#define | IL_LIF 0x0434
| Homeworld Texture - .lif extension.
#define | IL_MNG 0x0435
| Multiple-image Network Graphics - .mng extension.
#define | IL_JNG 0x0435
#define | IL_GIF 0x0436
| Graphics Interchange Format - .gif extension.
#define | IL_DDS 0x0437
| DirectDraw Surface - .dds extension.
#define | IL_DCX 0x0438
| ZSoft Multi-PCX - .dcx extension.
#define | IL_PSD 0x0439
| Adobe PhotoShop - .psd extension.
#define | IL_EXIF 0x043A
#define | IL_PSP 0x043B
| PaintShop Pro - .psp extension.
#define | IL_PIX 0x043C
| PIX - .pix extension.
#define | IL_PXR 0x043D
| Pixar - .pxr extension.
#define | IL_XPM 0x043E
| X Pixel Map - .xpm extension.
#define | IL_HDR 0x043F
| Radiance High Dynamic Range - .hdr extension.
#define | IL_ICNS 0x0440
| Macintosh Icon - .icns extension.
#define | IL_JP2 0x0441
| Jpeg 2000 - .jp2 extension.
#define | IL_EXR 0x0442
| OpenEXR - .exr extension.
#define | IL_WDP 0x0443
#define | IL_VTF 0x0444
| Valve Texture Format - .vtf extension.
#define | IL_WBMP 0x0445
| Wireless Bitmap - .wbmp extension.
#define | IL_SUN 0x0446
| Sun Raster - .sun, .ras, .rs, .im1, .im8, .im24 and .im32 extensions.
#define | IL_IFF 0x0447
| Interchange File Format - .iff extension.
#define | IL_TPL 0x0448
| Gamecube Texture - .tpl extension.
#define | IL_JASC_PAL 0x0475
| PaintShop Pro Palette.
#define | IL_NO_ERROR 0x0000
#define | IL_INVALID_ENUM 0x0501
#define | IL_OUT_OF_MEMORY 0x0502
#define | IL_FORMAT_NOT_SUPPORTED 0x0503
#define | IL_INTERNAL_ERROR 0x0504
#define | IL_INVALID_VALUE 0x0505
#define | IL_ILLEGAL_OPERATION 0x0506
#define | IL_ILLEGAL_FILE_VALUE 0x0507
#define | IL_INVALID_FILE_HEADER 0x0508
#define | IL_INVALID_PARAM 0x0509
#define | IL_COULD_NOT_OPEN_FILE 0x050A
#define | IL_INVALID_EXTENSION 0x050B
#define | IL_FILE_ALREADY_EXISTS 0x050C
#define | IL_OUT_FORMAT_SAME 0x050D
#define | IL_STACK_OVERFLOW 0x050E
#define | IL_STACK_UNDERFLOW 0x050F
#define | IL_INVALID_CONVERSION 0x0510
#define | IL_BAD_DIMENSIONS 0x0511
#define | IL_FILE_READ_ERROR 0x0512
#define | IL_FILE_WRITE_ERROR 0x0512
#define | IL_LIB_GIF_ERROR 0x05E1
#define | IL_LIB_JPEG_ERROR 0x05E2
#define | IL_LIB_PNG_ERROR 0x05E3
#define | IL_LIB_TIFF_ERROR 0x05E4
#define | IL_LIB_MNG_ERROR 0x05E5
#define | IL_LIB_JP2_ERROR 0x05E6
#define | IL_LIB_EXR_ERROR 0x05E7
#define | IL_UNKNOWN_ERROR 0x05FF
#define | IL_ORIGIN_SET 0x0600
#define | IL_ORIGIN_LOWER_LEFT 0x0601
#define | IL_ORIGIN_UPPER_LEFT 0x0602
#define | IL_ORIGIN_MODE 0x0603
#define | IL_FORMAT_SET 0x0610
#define | IL_FORMAT_MODE 0x0611
#define | IL_TYPE_SET 0x0612
#define | IL_TYPE_MODE 0x0613
#define | IL_FILE_OVERWRITE 0x0620
#define | IL_FILE_MODE 0x0621
#define | IL_CONV_PAL 0x0630
#define | IL_DEFAULT_ON_FAIL 0x0632
#define | IL_USE_KEY_COLOUR 0x0635
#define | IL_USE_KEY_COLOR 0x0635
#define | IL_BLIT_BLEND 0x0636
#define | IL_SAVE_INTERLACED 0x0639
#define | IL_INTERLACE_MODE 0x063A
#define | IL_QUANTIZATION_MODE 0x0640
#define | IL_WU_QUANT 0x0641
#define | IL_NEU_QUANT 0x0642
#define | IL_NEU_QUANT_SAMPLE 0x0643
#define | IL_MAX_QUANT_INDEXS 0x0644
#define | IL_MAX_QUANT_INDICES 0x0644
#define | IL_FASTEST 0x0660
#define | IL_LESS_MEM 0x0661
#define | IL_DONT_CARE 0x0662
#define | IL_MEM_SPEED_HINT 0x0665
#define | IL_USE_COMPRESSION 0x0666
#define | IL_NO_COMPRESSION 0x0667
#define | IL_COMPRESSION_HINT 0x0668
#define | IL_NVIDIA_COMPRESS 0x0670
#define | IL_SQUISH_COMPRESS 0x0671
#define | IL_SUB_NEXT 0x0680
#define | IL_SUB_MIPMAP 0x0681
#define | IL_SUB_LAYER 0x0682
#define | IL_COMPRESS_MODE 0x0700
#define | IL_COMPRESS_NONE 0x0701
#define | IL_COMPRESS_RLE 0x0702
#define | IL_COMPRESS_LZO 0x0703
#define | IL_COMPRESS_ZLIB 0x0704
#define | IL_TGA_CREATE_STAMP 0x0710
#define | IL_JPG_QUALITY 0x0711
#define | IL_PNG_INTERLACE 0x0712
#define | IL_TGA_RLE 0x0713
#define | IL_BMP_RLE 0x0714
#define | IL_SGI_RLE 0x0715
#define | IL_TGA_ID_STRING 0x0717
#define | IL_TGA_AUTHNAME_STRING 0x0718
#define | IL_TGA_AUTHCOMMENT_STRING 0x0719
#define | IL_PNG_AUTHNAME_STRING 0x071A
#define | IL_PNG_TITLE_STRING 0x071B
#define | IL_PNG_DESCRIPTION_STRING 0x071C
#define | IL_TIF_DESCRIPTION_STRING 0x071D
#define | IL_TIF_HOSTCOMPUTER_STRING 0x071E
#define | IL_TIF_DOCUMENTNAME_STRING 0x071F
#define | IL_TIF_AUTHNAME_STRING 0x0720
#define | IL_JPG_SAVE_FORMAT 0x0721
#define | IL_CHEAD_HEADER_STRING 0x0722
#define | IL_PCD_PICNUM 0x0723
#define | IL_JPG_PROGRESSIVE 0x0725
#define | IL_PNG_ALPHA_INDEX 0x0724
#define | IL_DXTC_FORMAT 0x0705
#define | IL_DXT1 0x0706
#define | IL_DXT2 0x0707
#define | IL_DXT3 0x0708
#define | IL_DXT4 0x0709
#define | IL_DXT5 0x070A
#define | IL_DXT_NO_COMP 0x070B
#define | IL_KEEP_DXTC_DATA 0x070C
#define | IL_DXTC_DATA_FORMAT 0x070D
#define | IL_3DC 0x070E
#define | IL_RXGB 0x070F
#define | IL_ATI1N 0x0710
#define | IL_DXT1A 0x0711
#define | IL_CUBEMAP_POSITIVEX 0x00000400
#define | IL_CUBEMAP_NEGATIVEX 0x00000800
#define | IL_CUBEMAP_POSITIVEY 0x00001000
#define | IL_CUBEMAP_NEGATIVEY 0x00002000
#define | IL_CUBEMAP_POSITIVEZ 0x00004000
#define | IL_CUBEMAP_NEGATIVEZ 0x00008000
#define | IL_SPHEREMAP 0x00010000
#define | IL_VERSION_NUM 0x0DE2
#define | IL_IMAGE_WIDTH 0x0DE4
#define | IL_IMAGE_HEIGHT 0x0DE5
#define | IL_IMAGE_DEPTH 0x0DE6
#define | IL_IMAGE_SIZE_OF_DATA 0x0DE7
#define | IL_IMAGE_BPP 0x0DE8
#define | IL_IMAGE_BYTES_PER_PIXEL 0x0DE8
#define | IL_IMAGE_BPP 0x0DE8
#define | IL_IMAGE_BITS_PER_PIXEL 0x0DE9
#define | IL_IMAGE_FORMAT 0x0DEA
#define | IL_IMAGE_TYPE 0x0DEB
#define | IL_PALETTE_TYPE 0x0DEC
#define | IL_PALETTE_SIZE 0x0DED
#define | IL_PALETTE_BPP 0x0DEE
#define | IL_PALETTE_NUM_COLS 0x0DEF
#define | IL_PALETTE_BASE_TYPE 0x0DF0
#define | IL_NUM_FACES 0x0DE1
#define | IL_NUM_IMAGES 0x0DF1
#define | IL_NUM_MIPMAPS 0x0DF2
#define | IL_NUM_LAYERS 0x0DF3
#define | IL_ACTIVE_IMAGE 0x0DF4
#define | IL_ACTIVE_MIPMAP 0x0DF5
#define | IL_ACTIVE_LAYER 0x0DF6
#define | IL_ACTIVE_FACE 0x0E00
#define | IL_CUR_IMAGE 0x0DF7
#define | IL_IMAGE_DURATION 0x0DF8
#define | IL_IMAGE_PLANESIZE 0x0DF9
#define | IL_IMAGE_BPC 0x0DFA
#define | IL_IMAGE_OFFX 0x0DFB
#define | IL_IMAGE_OFFY 0x0DFC
#define | IL_IMAGE_CUBEFLAGS 0x0DFD
#define | IL_IMAGE_ORIGIN 0x0DFE
#define | IL_IMAGE_CHANNELS 0x0DFF
#define | DEPRECATED (D) D
#define | ILAPIENTRY
#define | IL_PACKSTRUCT
#define | ILAPI
#define | IL_SEEK_SET 0
#define | IL_SEEK_CUR 1
#define | IL_SEEK_END 2
#define | IL_EOF -1
#define | ilClearColor ilClearColour
#define | ilKeyColor ilKeyColour
#define | imemclear(x, y) memset(x,0,y);

## Typedefs

typedef unsigned int | ILenum
typedef unsigned char | ILboolean
typedef unsigned int | ILbitfield
typedef signed char | ILbyte
typedef signed short | ILshort
typedef int | ILint
typedef size_t | ILsizei
typedef unsigned char | ILubyte
typedef unsigned short | ILushort
typedef unsigned int | ILuint
typedef float | ILfloat
typedef float | ILclampf
typedef double | ILdouble
typedef double | ILclampd
typedef long long int | ILint64
typedef long long unsigned int | ILuint64
typedef void * | ILHANDLE
typedef void(ILAPIENTRY * | fCloseRProc )(ILHANDLE)
typedef void(ILAPIENTRY * | fCloseWProc )(ILHANDLE)
typedef void *(ILAPIENTRY * | mAlloc )(const ILsizei)
typedef ILenum(ILAPIENTRY * | IL_LOADPROC )(ILconst_string)
typedef ILenum(ILAPIENTRY * | IL_SAVEPROC )(ILconst_string)

## Functions

typedef | ILboolean (ILAPIENTRY *fEofProc)(ILHANDLE)
typedef | ILint (ILAPIENTRY *fGetcProc)(ILHANDLE)
typedef | ILHANDLE (ILAPIENTRY *fOpenRProc)(ILconst_string)
typedef | void (ILAPIENTRY *mFree)(const void *CONST_RESTRICT)
ILAPI ILboolean ILAPIENTRY | ilActiveFace (ILuint Number)
| Used for setting the current face if it is a cubemap.
ILAPI ILboolean ILAPIENTRY | ilActiveImage (ILuint Number)
| Used for setting the current image if it is an animation.
ILAPI ILboolean ILAPIENTRY | ilActiveLayer (ILuint Number)
| Used for setting the current layer if layers exist.
ILAPI ILboolean ILAPIENTRY | ilActiveMipmap (ILuint Number)
| Sets the current mipmap level.
ILAPI ILboolean ILAPIENTRY | ilApplyPal (ILconst_string FileName)
ILAPI ILboolean ILAPIENTRY | ilApplyProfile (ILstring InProfile, ILstring OutProfile)
ILAPI void ILAPIENTRY | ilBindImage (ILuint Image)
| Makes Image the current active image - similar to glBindTexture().
ILAPI ILboolean ILAPIENTRY | ilBlit (ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth)
ILAPI ILboolean ILAPIENTRY | ilClampNTSC (void)
| Clamps data values of unsigned bytes from 16 to 235 for display on an.
ILAPI void ILAPIENTRY | ilClearColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
ILAPI ILboolean ILAPIENTRY | ilClearImage (void)
| Clears the current bound image to the values specified in ilClearColour.
ILAPI ILuint ILAPIENTRY | ilCloneCurImage (void)
ILAPI ILubyte *ILAPIENTRY | ilCompressDXT (ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize)
| Compresses data to a DXT format using different methods.
ILAPI ILboolean ILAPIENTRY | ilCompressFunc (ILenum Mode)
ILAPI ILboolean ILAPIENTRY | ilConvertImage (ILenum DestFormat, ILenum DestType)
| Converts the current image to the DestFormat format.
ILAPI ILboolean ILAPIENTRY | ilConvertPal (ILenum DestFormat)
| Converts the current image to the DestFormat format.
ILAPI ILboolean ILAPIENTRY | ilCopyImage (ILuint Src)
| Copies everything from Src to the current bound image.
ILAPI ILuint ILAPIENTRY | ilCopyPixels (ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data)
ILAPI ILuint ILAPIENTRY | ilCreateSubImage (ILenum Type, ILuint Num)
ILAPI ILboolean ILAPIENTRY | ilDefaultImage (void)
| Creates an ugly 64x64 black and yellow checkerboard image.
ILAPI void ILAPIENTRY | ilDeleteImage (const ILuint Num)
ILAPI void ILAPIENTRY | ilDeleteImages (ILsizei Num, const ILuint *Images)
| Deletes Num images from the image stack - similar to glDeleteTextures().
ILAPI ILenum ILAPIENTRY | ilDetermineType (ILconst_string FileName)
ILAPI ILenum ILAPIENTRY | ilDetermineTypeF (ILHANDLE File)
ILAPI ILenum ILAPIENTRY | ilDetermineTypeL (const void *Lump, ILuint Size)
ILAPI ILboolean ILAPIENTRY | ilDisable (ILenum Mode)
| Disables a mode.
ILAPI ILboolean ILAPIENTRY | ilDxtcDataToImage (void)
ILAPI ILboolean ILAPIENTRY | ilDxtcDataToSurface (void)
ILAPI ILboolean ILAPIENTRY | ilEnable (ILenum Mode)
| Enables a mode.
ILAPI ILboolean ILAPIENTRY | ilFormatFunc (ILenum Mode)
| Sets the default format to be used.
ILAPI void ILAPIENTRY | ilGenImages (ILsizei Num, ILuint *Images)
| Creates Num images and puts their index in Images - similar to glGenTextures().
ILAPI ILuint ILAPIENTRY | ilGenImage (void)
ILAPI ILubyte *ILAPIENTRY | ilGetAlpha (ILenum Type)
ILAPI ILboolean ILAPIENTRY | ilGetBoolean (ILenum Mode)
| Returns the current value of the Mode.
ILAPI void ILAPIENTRY | ilGetBooleanv (ILenum Mode, ILboolean *Param)
| Sets Param equal to the current value of the Mode.
ILAPI ILubyte *ILAPIENTRY | ilGetData (void)
| Returns a pointer to the current image's data.
ILAPI ILuint ILAPIENTRY | ilGetDXTCData (void *Buffer, ILuint BufferSize, ILenum DXTCFormat)
ILAPI ILenum ILAPIENTRY | ilGetError (void)
| Gets the last error on the error stack.
ILAPI ILint ILAPIENTRY | ilGetInteger (ILenum Mode)
| Returns the current value of the Mode.
ILAPI void ILAPIENTRY | ilGetIntegerv (ILenum Mode, ILint *Param)
| Sets Param equal to the current value of the Mode.
ILAPI ILuint ILAPIENTRY | ilGetLumpPos (void)
ILAPI ILubyte *ILAPIENTRY | ilGetPalette (void)
| Returns a pointer to the current image's palette data.
ILAPI ILconst_string ILAPIENTRY | ilGetString (ILenum StringName)
| Returns a constant string detailing aspects about this library.
ILAPI void ILAPIENTRY | ilHint (ILenum Target, ILenum Mode)
| Specifies implementation-dependent performance hints.
ILAPI void ILAPIENTRY | ilInit (void)
ILAPI ILboolean ILAPIENTRY | ilImageToDxtcData (ILenum Format)
ILAPI ILboolean ILAPIENTRY | ilIsDisabled (ILenum Mode)
| Checks whether the mode is disabled.
ILAPI ILboolean ILAPIENTRY | ilIsEnabled (ILenum Mode)
| Checks whether the mode is enabled.
ILAPI ILboolean ILAPIENTRY | ilIsImage (ILuint Image)
| Checks if Image is a valid ilGenImages-generated image (like glIsTexture()).
ILAPI ILboolean ILAPIENTRY | ilIsValid (ILenum Type, ILconst_string FileName)
ILAPI ILboolean ILAPIENTRY | ilIsValidF (ILenum Type, ILHANDLE File)
ILAPI ILboolean ILAPIENTRY | ilIsValidL (ILenum Type, void *Lump, ILuint Size)
ILAPI void ILAPIENTRY | ilKeyColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
ILAPI ILboolean ILAPIENTRY | ilLoad (ILenum Type, ILconst_string FileName)
| Attempts to load an image from a file. The file format is specified by the user.
ILAPI ILboolean ILAPIENTRY | ilLoadF (ILenum Type, ILHANDLE File)
ILAPI ILboolean ILAPIENTRY | ilLoadImage (ILconst_string FileName)
| Attempts to load an image from a file with various different methods before failing - very generic.
ILAPI ILboolean ILAPIENTRY | ilLoadL (ILenum Type, const void *Lump, ILuint Size)
ILAPI ILboolean ILAPIENTRY | ilLoadPal (ILconst_string FileName)
| Loads a palette from FileName into the current image's palette.
ILAPI void ILAPIENTRY | ilModAlpha (ILdouble AlphaValue)
ILAPI ILboolean ILAPIENTRY | ilOriginFunc (ILenum Mode)
| Sets the default origin to be used.
ILAPI ILboolean ILAPIENTRY | ilOverlayImage (ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord)
| Overlays the image found in Src on top of the current bound image at the coords specified.
ILAPI void ILAPIENTRY | ilPopAttrib (void)
| Pops the last entry off the state stack into the current states.
ILAPI void ILAPIENTRY | ilPushAttrib (ILuint Bits)
| Pushes the states indicated by Bits onto the state stack.
ILAPI void ILAPIENTRY | ilRegisterFormat (ILenum Format)
ILAPI ILboolean ILAPIENTRY | ilRegisterLoad (ILconst_string Ext, IL_LOADPROC Load)
ILAPI ILboolean ILAPIENTRY | ilRegisterMipNum (ILuint Num)
ILAPI ILboolean ILAPIENTRY | ilRegisterNumFaces (ILuint Num)
ILAPI ILboolean ILAPIENTRY | ilRegisterNumImages (ILuint Num)
ILAPI void ILAPIENTRY | ilRegisterOrigin (ILenum Origin)
ILAPI void ILAPIENTRY | ilRegisterPal (void *Pal, ILuint Size, ILenum Type)
ILAPI ILboolean ILAPIENTRY | ilRegisterSave (ILconst_string Ext, IL_SAVEPROC Save)
ILAPI void ILAPIENTRY | ilRegisterType (ILenum Type)
ILAPI ILboolean ILAPIENTRY | ilRemoveLoad (ILconst_string Ext)
| Unregisters a load extension - doesn't have to be called.
ILAPI ILboolean ILAPIENTRY | ilRemoveSave (ILconst_string Ext)
| Unregisters a save extension - doesn't have to be called.
ILAPI void ILAPIENTRY | ilResetMemory (void)
ILAPI void ILAPIENTRY | ilResetRead (void)
ILAPI void ILAPIENTRY | ilResetWrite (void)
ILAPI ILboolean ILAPIENTRY | ilSave (ILenum Type, ILconst_string FileName)
ILAPI ILuint ILAPIENTRY | ilSaveF (ILenum Type, ILHANDLE File)
ILAPI ILboolean ILAPIENTRY | ilSaveImage (ILconst_string FileName)
| Determines what image type to save based on the extension and attempts to save.
ILAPI ILuint ILAPIENTRY | ilSaveL (ILenum Type, void *Lump, ILuint Size)
ILAPI ILboolean ILAPIENTRY | ilSavePal (ILconst_string FileName)
ILAPI ILboolean ILAPIENTRY | ilSetAlpha (ILdouble AlphaValue)
ILAPI ILboolean ILAPIENTRY | ilSetData (void *Data)
| Uploads Data of the same size to replace the current image's data.
ILAPI ILboolean ILAPIENTRY | ilSetDuration (ILuint Duration)
ILAPI void ILAPIENTRY | ilSetInteger (ILenum Mode, ILint Param)
ILAPI void ILAPIENTRY | ilSetMemory (mAlloc, mFree)
ILAPI void ILAPIENTRY | ilSetPixels (ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data)
ILAPI void ILAPIENTRY | ilSetRead (fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc)
| Allows you to override the default file-reading functions.
ILAPI void ILAPIENTRY | ilSetString (ILenum Mode, const char *String)
ILAPI void ILAPIENTRY | ilSetWrite (fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc)
ILAPI void ILAPIENTRY | ilShutDown (void)
ILAPI ILboolean ILAPIENTRY | ilSurfaceToDxtcData (ILenum Format)
ILAPI ILboolean ILAPIENTRY | ilTexImage (ILuint Width, ILuint Height, ILuint Depth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data)
| Changes the current bound image to use these new dimensions (current data is destroyed).
ILAPI ILboolean ILAPIENTRY | ilTexImageDxtc (ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte *data)
ILAPI ILenum ILAPIENTRY | ilTypeFromExt (ILconst_string FileName)
ILAPI ILboolean ILAPIENTRY | ilTypeFunc (ILenum Mode)
| Sets the default type to be used.
ILAPI ILboolean ILAPIENTRY | ilLoadData (ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
| Reads a raw data file.
ILAPI ILboolean ILAPIENTRY | ilLoadDataF (ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
| Reads an already-opened raw data file.
ILAPI ILboolean ILAPIENTRY | ilLoadDataL (void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
| Reads from a raw data memory "lump".
ILAPI ILboolean ILAPIENTRY | ilSaveData (ILconst_string FileName)
| Save the current image to FileName as raw data.

## Detailed Description

The main include file for DevIL

## Function Documentation

ILAPI ILboolean ILAPIENTRY ilConvertImage | ( | ILenum | DestFormat,
|  | ILenum | DestType |
| ) |  |  |

Converts the current image to the DestFormat format.

Parameters:

  | DestFormat | An enum of the desired output format. Any format values are accepted.
  | DestType | An enum of the desired output type. Any type values are accepted.

Exceptions:

  | IL_ILLEGAL_OPERATION | No currently bound image
  | IL_INVALID_CONVERSION | DestFormat or DestType was an invalid identifier.
  | IL_OUT_OF_MEMORY | Could not allocate enough memory.

Returns:
  Boolean value of failure or success

ILAPI ILubyte* ILAPIENTRY ilGetData | ( | void |  | ) |

Returns a pointer to the current image's data.

The pointer to the image data returned by this function is only valid until any operations are done on the image. After any operations, this function should be called again. The pointer can be cast to other types for images that have more than one byte per channel for easier access to data.

Exceptions:

  | IL_ILLEGAL_OPERATION | No currently bound image

Returns:
  ILubyte pointer to image data.

ILAPI ILubyte* ILAPIENTRY ilGetPalette | ( | void |  | ) |

Returns a pointer to the current image's palette data.

The pointer to the image palette data returned by this function is only valid until any operations are done on the image. After any operations, this function should be called again.

Exceptions:

  | IL_ILLEGAL_OPERATION | No currently bound image

Returns:
  ILubyte pointer to image palette data.

ILAPI ILboolean ILAPIENTRY ilLoad | ( | ILenum | Type,
|  | ILconst_string | FileName |
| ) |  |  |

Attempts to load an image from a file. The file format is specified by the user.

Parameters:

  | Type | Format of this file. Acceptable values are IL_BMP, IL_CUT, IL_DCX, IL_DDS, IL_DOOM, IL_DOOM_FLAT, IL_EXR, IL_GIF, IL_HDR, IL_ICO, IL_ICNS, IL_IFF, IL_JP2, IL_JPG, IL_LIF, IL_MDL, IL_MNG, IL_PCD, IL_PCX, IL_PIX, IL_PNG, IL_PNM, IL_PSD, IL_PSP, IL_PXR, IL_SGI, IL_SUN, IL_TGA, IL_TIF, IL_TPL, IL_VTF, IL_WAL, IL_WBMP, IL_XPM, IL_RAW and IL_JASC_PAL.
  | FileName | Ansi or Unicode string, depending on the compiled version of DevIL, that gives the filename of the file to load.

Returns:
  Boolean value of failure or success. Returns IL_FALSE if all three loading methods have been tried and failed.

ILAPI ILboolean ILAPIENTRY ilLoadImage | ( | ILconst_string | FileName | ) |

Attempts to load an image from a file with various different methods before failing - very generic.

The ilLoadImage function allows a general interface to the specific internal file-loading routines. First, it finds the extension and checks to see if any user-registered functions (registered through ilRegisterLoad) match the extension. If nothing matches, it takes the extension and determines which function to call based on it. Lastly, it attempts to identify the image based on various image header verification functions, such as ilIsValidPngF. If all this checking fails, IL_FALSE is returned with no modification to the current bound image.

Parameters:

  | FileName | Ansi or Unicode string, depending on the compiled version of DevIL, that gives the filename of the file to load.

Returns:
  Boolean value of failure or success. Returns IL_FALSE if all three loading methods have been tried and failed.

ILAPI ILboolean ILAPIENTRY ilSetData | ( | void * | Data | ) |

Uploads Data of the same size to replace the current image's data.

Parameters:

  | Data | New image data to update the currently bound image

Exceptions:

  | IL_ILLEGAL_OPERATION | No currently bound image
  | IL_INVALID_PARAM | Data was NULL.

Returns:
  Boolean value of failure or success

ILAPI ILboolean ILAPIENTRY ilTexImage | ( | ILuint | Width,
|  | ILuint | Height,
|  | ILuint | Depth,
|  | ILubyte | Bpp,
|  | ILenum | Format,
|  | ILenum | Type,
|  | void * | Data |
| ) |  |  |

Changes the current bound image to use these new dimensions (current data is destroyed).

Parameters:

  | Width | Specifies the new image width. This cannot be 0.
  | Height | Specifies the new image height. This cannot be 0.
  | Depth | Specifies the new image depth. This cannot be 0.
  | Bpp | Number of channels (ex. 3 for RGB)
  | Format | Enum of the desired format. Any format values are accepted.
  | Type | Enum of the desired type. Any type values are accepted.
  | Data | Specifies data that should be copied to the new image. If this parameter is NULL, no data is copied, and the new image data consists of undefined values.

Exceptions:

  | IL_ILLEGAL_OPERATION | No currently bound image.
  | IL_INVALID_PARAM | One of the parameters is incorrect, such as one of the dimensions being 0.
  | IL_OUT_OF_MEMORY | Could not allocate enough memory.

Returns:
  Boolean value of failure or success