kolrabi's another Image Library  1.11.0
 All Files Functions Groups Pages
il_api.c File Reference

Contains public IL entry functions. More...

Functions

ILboolean ILAPIENTRY ilActiveFace (ILuint Number)
 Sets the current face if the currently bound image is a cubemap. More...
 
ILboolean ILAPIENTRY ilActiveImage (ILuint Number)
 Sets the current animation frame. More...
 
ILboolean ILAPIENTRY ilActiveLayer (ILuint Number)
 Sets the current image layer. More...
 
ILboolean ILAPIENTRY ilActiveMipmap (ILuint Number)
 Sets the current mipmap level. More...
 
ILboolean ILAPIENTRY ilAddAlpha ()
 Adds an opaque alpha channel to the currently bound image. More...
 
ILboolean ILAPIENTRY ilApplyPal (ILconst_string FileName)
 Loads a palette from a file and applies it to the currently bound image.
 
ILboolean ILAPIENTRY ilApplyProfile (ILstring InProfile, ILstring OutProfile)
 Apply a colour profile to the currently bound image. More...
 
void ILAPIENTRY ilBindImage (ILuint Image)
 Makes Image the current active image - similar to glBindTexture(). More...
 
ILboolean ILAPIENTRY ilBlit (ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth)
 Blit a region of pixels from a Source image into the currently bound image.
 
ILboolean ILAPIENTRY ilCanIdentifyFormat (ILenum Format)
 Checks if a given image format can be automatically detected from data. More...
 
ILboolean ILAPIENTRY ilCanLoadFormat (ILenum Format)
 Checks if a given image format can be loaded. More...
 
ILboolean ILAPIENTRY ilCanSaveFormat (ILenum Format)
 Checks if a given image format can be saved. More...
 
ILboolean ILAPIENTRY ilClampNTSC (void)
 Clamps data values of unsigned bytes from 16 to 235 for display on an NTSC television. More...
 
void ILAPIENTRY ilClearColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
 Set a new clear colour to use by ilClearImage().
 
ILboolean ILAPIENTRY ilClearImage ()
 Clears the current bound image to the values specified in ilClearColour().
 
void ILAPIENTRY ilClearIndex (ILuint Index)
 Set a new clear colour index to use by ilClearImage() when clearing paletted images. More...
 
void ILAPIENTRY ilClearMetadata ()
 Strips all metadata from an image. More...
 
ILuint ILAPIENTRY ilCloneCurImage ()
 Creates a duplicate of the currently bound image.
 
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. More...
 
ILboolean ILAPIENTRY ilConvertImage (ILenum DestFormat, ILenum DestType)
 Converts the current image to the DestFormat format. More...
 
ILboolean ILAPIENTRY ilConvertPal (ILenum DestFormat)
 Converts the palette of current image to the DestFormat format.
 
ILboolean ILAPIENTRY ilCopyImage (ILuint Src)
 Copies everything from Src to the current bound image. More...
 
ILuint ILAPIENTRY ilCopyPixels (ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data)
 Copy the pixels of a region of the currently bound image to a buffer. More...
 
ILuint ILAPIENTRY ilCreateSubImage (ILenum Type, ILuint Num)
 Creates sub images of the given type for the currently bound image. More...
 
ILboolean ILAPIENTRY ilDefaultImage ()
 Creates an ugly 64x64 black and yellow checkerboard image.
 
void ILAPIENTRY ilDeleteImage (const ILuint Num)
 Delete one single image from the image stack.
 
void ILAPIENTRY ilDeleteImages (ILsizei Num, const ILuint *Images)
 Deletes Num images from the image stack - similar to glDeleteTextures().
 
ILAPI ILuint ILAPIENTRY ilDetermineSize (ILenum Type)
 Returns the size of the memory buffer needed to save the current image into this Type. More...
 
ILenum ILAPIENTRY ilDetermineType (ILconst_string FileName)
 Determines the type of a file from its contents or if necessary from its extension. More...
 
ILenum ILAPIENTRY ilDetermineTypeF (ILHANDLE File)
 Determines the type of a file from its contents. More...
 
ILenum ILAPIENTRY ilDetermineTypeFuncs ()
 Determines the type of a file from its contents starting from the current position of the current file. More...
 
ILenum ILAPIENTRY ilDetermineTypeL (const void *Lump, ILuint Size)
 Determines the type of a lump in memory from its contents. More...
 
ILboolean ILAPIENTRY ilDisable (ILenum Mode)
 Disables a mode. More...
 
ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage ()
 Decompresses stored DXTC data into the currently bound image and all of its mipmaps.
 
ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface ()
 Decompresses stored DXTC data into the currently bound image.
 
ILboolean ILAPIENTRY ilEnable (ILenum Mode)
 Enables a mode. More...
 
ILAPI ILboolean ILAPIENTRY ilEnumMetadata (ILuint Index, ILenum *IFD, ILenum *ID)
 Enumerate over all metadata. More...
 
void ILAPIENTRY ilFlipSurfaceDxtcData ()
 Flips the stored DXTC data of the currently bound image vertically.
 
ILboolean ILAPIENTRY ilFormatFunc (ILenum Mode)
 Set the default image format to use. More...
 
ILuint ILAPIENTRY ilGenImage (void)
 Create one single new image on the image stack.
 
void ILAPIENTRY ilGenImages (ILsizei Num, ILuint *Images)
 Creates Num images and puts their index in Images - similar to glGenTextures().
 
ILubyte *ILAPIENTRY ilGetAlpha (ILenum Type)
 Extract the alpha channel from the currently bound image. More...
 
ILboolean ILAPIENTRY ilGetBoolean (ILenum Mode)
 Returns the current value of the Mode.
 
void ILAPIENTRY ilGetBooleanv (ILenum Mode, ILboolean *Param)
 Sets Param equal to the current value of the Mode.
 
ILubyte *ILAPIENTRY ilGetData (void)
 Returns a pointer to the current image's data. More...
 
ILuint ILAPIENTRY ilGetDXTCData (void *Buffer, ILuint BufferSize, ILenum DXTCFormat)
 Compress image data using internal DXTC compression and copy the data into the supplied buffer and returns the number of bytes written. More...
 
ILenum ILAPIENTRY ilGetError (void)
 Gets the last error on the error stack. More...
 
ILfloat ILAPIENTRY ilGetFloat (ILenum Mode)
 Returns a current float value. More...
 
ILfloat ILAPIENTRY ilGetFloatImage (ILuint ImageName, ILenum Mode)
 Gets a current value from an image. More...
 
ILuint ILAPIENTRY ilGetFloatv (ILenum Mode, ILfloat *Param)
 Gets the current value(s) of the Mode. More...
 
ILAPI const ILconst_string
*ILAPIENTRY 
ilGetFormatExts (ILenum Format)
 Gets file extensions by which a given format is identified. More...
 
ILint ILAPIENTRY ilGetInteger (ILenum Mode)
 Returns the current value of the Mode. More...
 
ILint ILAPIENTRY ilGetIntegerImage (ILuint ImageName, ILenum Mode)
 Get a value about a specific image. More...
 
ILuint ILAPIENTRY ilGetIntegerv (ILenum Mode, ILint *Param)
 Gets the current value(s) of the Mode. More...
 
ILuint64 ILAPIENTRY ilGetLumpPos ()
 Get the current position into the memory lump (if any is set) of the currently bound image.
 
ILboolean ILAPIENTRY ilGetMetadata (ILenum IFD, ILenum ID, ILenum *Type, ILuint *Count, ILuint *Size, void **Data)
 Retrieve raw image meta data. More...
 
ILubyte *ILAPIENTRY ilGetPalette (void)
 Returns a pointer to the current image's palette data. More...
 
ILconst_string ILAPIENTRY ilGetString (ILenum StringName)
 Returns a constant string detailing aspects about this library. More...
 
void ILAPIENTRY ilHint (ILenum Target, ILenum Mode)
 Specifies implementation-dependent performance hints. More...
 
ILboolean ILAPIENTRY ilImageToDxtcData (ILenum Format)
 Convert the DXTC data of the currently bound image and its mipmaps into image data.
 
void ILAPIENTRY ilInit (void)
 Initialize the image library. More...
 
ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha ()
 Invert the alpha channel in the DXTC data of the currently bound image.
 
ILboolean ILAPIENTRY ilIsDisabled (ILenum Mode)
 Checks whether a Mode is not enabled. More...
 
ILboolean ILAPIENTRY ilIsEnabled (ILenum Mode)
 Checks whether a Mode is enabled. More...
 
ILboolean ILAPIENTRY ilIsImage (ILuint Image)
 Checks whether a given Image name is valid.
 
ILboolean ILAPIENTRY ilIsValid (ILenum Type, ILconst_string FileName)
 Check if a file is of a given type. More...
 
ILboolean ILAPIENTRY ilIsValidF (ILenum Type, ILHANDLE File)
 Check if a file is of a given type. More...
 
ILboolean ILAPIENTRY ilIsValidL (ILenum Type, void *Lump, ILuint Size)
 Check if a memory lump is of a given type. More...
 
void ILAPIENTRY ilKeyColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
 Set the current color key.
 
ILboolean ILAPIENTRY ilLoad (ILenum Type, ILconst_string FileName)
 Attempts to load an image from a file. More...
 
ILboolean ILAPIENTRY ilLoadData (ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
 Loads raw data from a file.
 
ILboolean ILAPIENTRY ilLoadDataF (ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
 Loads raw data from an already-opened file.
 
ILboolean ILAPIENTRY ilLoadDataL (void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
 Loads raw data from a memory "lump".
 
ILboolean ILAPIENTRY ilLoadF (ILenum Type, ILHANDLE File)
 Attempts to load an image from a file stream. More...
 
ILboolean ILAPIENTRY ilLoadFuncs (ILenum Type)
 Attempts to load an image using the currently set IO functions. More...
 
ILboolean ILAPIENTRY ilLoadImage (ILconst_string FileName)
 Attempts to load an image from a file with various different methods before failing - very generic. More...
 
ILboolean ILAPIENTRY ilLoadL (ILenum Type, const void *Lump, ILuint Size)
 Attempts to load an image from a memory buffer. More...
 
ILboolean ILAPIENTRY ilLoadPal (ILconst_string FileName)
 Loads a palette from FileName into the current image's palette.
 
void ILAPIENTRY ilModAlpha (ILdouble AlphaValue)
 Adds an alpha channel if not present and sets it to the given value. More...
 
ILboolean ILAPIENTRY ilOriginFunc (ILenum Mode)
 Sets the default origin to be used. More...
 
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.
 
void ILAPIENTRY ilPopAttrib (void)
 Pops the last entry off the state stack into the current states.
 
void ILAPIENTRY ilPushAttrib (ILuint Bits)
 Pushes the states indicated by Bits onto the state stack. More...
 
void ILAPIENTRY ilRegisterFormat (ILenum Format)
 Sets the pixel data format of the currently bound image (no conversion). More...
 
ILboolean ILAPIENTRY ilRegisterLoad (ILconst_string Ext, IL_LOADPROC Load)
 Register a file loading function for a file extension.
 
ILboolean ILAPIENTRY ilRegisterMipNum (ILuint Num)
 Preallocates mipmap images for the currently bound image.
 
ILboolean ILAPIENTRY ilRegisterNumFaces (ILuint Num)
 Preallocates cubemap faces for the currently bound image.
 
ILboolean ILAPIENTRY ilRegisterNumImages (ILuint Num)
 Preallocates following animation frames for currently bound image.
 
void ILAPIENTRY ilRegisterOrigin (ILenum Origin)
 Sets the origin of the currently bound image (no conversion). More...
 
void ILAPIENTRY ilRegisterPal (void *Pal, ILuint Size, ILenum Type)
 Sets the palette data of the currently bound image.
 
ILboolean ILAPIENTRY ilRegisterSave (ILconst_string Ext, IL_SAVEPROC Save)
 Register a file saving function for a file extension.
 
void ILAPIENTRY ilRegisterType (ILenum Type)
 Sets the image pixel data type (no conversion). More...
 
ILboolean ILAPIENTRY ilRemoveAlpha ()
 Removes the alpha channel from the currently bound image. More...
 
ILboolean ILAPIENTRY ilRemoveLoad (ILconst_string Ext)
 Unregisters a load extension - doesn't have to be called.
 
ILboolean ILAPIENTRY ilRemoveSave (ILconst_string Ext)
 Unregisters a save extension - doesn't have to be called.
 
void ILAPIENTRY ilResetMemory ()
 Set memory allocation/deallocation functions back to default. More...
 
void ILAPIENTRY ilResetRead ()
 Reset the file reading functions of the currently bound image to the default.
 
void ILAPIENTRY ilResetWrite ()
 Reset the file saving functions of the currently bound image to the default.
 
ILboolean ILAPIENTRY ilSave (ILenum Type, ILconst_string FileName)
 Attempts to save an image to a file. More...
 
ILboolean ILAPIENTRY ilSaveData (ILconst_string FileName)
 Save the current image to FileName as raw data.
 
ILuint ILAPIENTRY ilSaveF (ILenum Type, ILHANDLE File)
 Attempts to save an image to a file stream. More...
 
ILAPI ILboolean ILAPIENTRY ilSaveFuncs (ILenum type)
 Attempts to load an image using the currently set IO functions. More...
 
ILboolean ILAPIENTRY ilSaveImage (ILconst_string FileName)
 Saves the current image based on the extension given in FileName. More...
 
ILuint ILAPIENTRY ilSaveL (ILenum Type, void *Lump, ILuint Size)
 Attempts to save an image to a memory buffer. More...
 
ILboolean ILAPIENTRY ilSavePal (ILconst_string FileName)
 Saves a palette from the current image's palette to a file.
 
ILboolean ILAPIENTRY ilSetAlpha (ILdouble AlphaValue)
 Adds an alpha channel if not present and sets it to the given value. More...
 
ILboolean ILAPIENTRY ilSetData (void *Data)
 Uploads Data of the same size to replace the current image's data. More...
 
ILboolean ILAPIENTRY ilSetDuration (ILuint Duration)
 Set the duration of the currently bound image. More...
 
void ILAPIENTRY ilSetFloat (ILenum Mode, ILfloat Param)
 Sets a parameter value for a Mode. More...
 
void ILAPIENTRY ilSetFloatv (ILenum Mode, ILfloat *Param)
 Sets a parameter value for a Mode. More...
 
void ILAPIENTRY ilSetInteger (ILenum Mode, ILint Param)
 Sets a parameter value for a Mode. More...
 
void ILAPIENTRY ilSetIntegerv (ILenum Mode, ILint *Param)
 Sets a parameter value for a Mode. More...
 
void ILAPIENTRY ilSetMemory (mAlloc mallocFunc, mFree freeFunc)
 Sets the memory allocation and deallocation functions. More...
 
ILAPI ILboolean ILAPIENTRY ilSetMetadata (ILenum IFD, ILenum ID, ILenum Type, ILuint Count, ILuint Size, const void *Data)
 Set raw meta data. More...
 
void ILAPIENTRY ilSetPixels (ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data)
 Set the pixels in a region of the currently bound image.
 
ILboolean ILAPIENTRY ilSetRead (fOpenProc aOpen, fCloseProc aClose, fEofProc aEof, fGetcProc aGetc, fReadProc aRead, fSeekProc aSeek, fTellProc aTell)
 Allows you to override the default file-reading functions.
 
void ILAPIENTRY ilSetString (ILenum StringName, ILconst_string String)
 Sets a string detailing aspects about this library. More...
 
ILboolean ILAPIENTRY ilSetWrite (fOpenProc Open, fCloseProc Close, fPutcProc Putc, fSeekProc Seek, fTellProc Tell, fWriteProc Write)
 Allows you to override the default file-writing functions.
 
void ILAPIENTRY ilShutDown (void)
 Shuts down the image library.
 
ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData (ILenum Format)
 Compresses the currently bound image with DXTC and store the result in its internal DXTC data buffer.
 
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). More...
 
ILAPI ILboolean ILAPIENTRY ilTexImageDxtc (ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, const ILubyte *Data)
 Sets the currently bound image data. More...
 
ILenum ILAPIENTRY ilTypeFromExt (ILconst_string FileName)
 Get the image type for a given file name by its extension.
 
ILboolean ILAPIENTRY ilTypeFunc (ILenum Mode)
 Sets the default type to be used.
 

Detailed Description

Contains public IL entry functions.

Just calls the internal versions of the functions for now.