Tao.DevIl
DevIL (Developer's Image Library) ILUT binding for .NET.
Specifies the calling convention.
Specifies .
Specifies the DevIL ILUT native library used in the bindings
The Windows dll is specified here universally - note that
under Mono the non-windows native library can be mapped using
the ".config" file mechanism. Kudos to the Mono team for this
simple yet elegant solution.
An unacceptable enumerated value was passed to a function.
Could not allocate enough memory in an operation.
An invalid value was passed to a function or was in a file.
The operation attempted is not allowable in the current state. The function returns with no ill side effects.
An invalid parameter was passed to a function, such as a NULL pointer.
Could not open the file specified. The file may already be open by another app or may not exist.
One of the internal stacks was already filled, and the user tried to add on to the full stack.
One of the internal stacks was empty, and the user tried to empty the already empty stack.
A type is valid but not supported in the current build.
Whether ilut uses palettes or converts the image to truecolour before sending it to the renderer.
Whether to use GL_RGB8 or GL_RGB, etc. when passing data to OpenGL only.
Returns the version number of the shared library. This can be checked against the ILUT_VERSION #define
The ilutGetBooleanv return the value of a selected mode.
The selected mode.
The ilutGetBoolean returns the value of a selected mode.
The ilutGetBoolean return the value of a selected mode.
The ilutGetBoolean returns the value of a selected mode.
Used to store the return values.
The ilutGetBoolean return the value of a selected mode.
The ilutGetBoolean returns the value of a selected mode.
Used to store the return values.
The ilutGetInteger return the value of a selected mode.
The ilutGetBoolean returns the value of a selected mode.
The ilutInit function initializes ILUT.
ilutIsDisabled returns whether the mode indicated by Mode is disabled.
Indicates an OpenIL mode
ilutIsEnabled returns whether the mode indicated by Mode is enabled.
Indicates an OpenIL mode
ilutPopAttrib pops the last pushed stack entry off the stack and copies the bits specified when pushed by ilutPushAttrib to the previous set of states.
The ilutGLBindTexImage function binds an image to a generated OpenGL texture.
The ilutGLBindMipmaps function binds an image to an OpenGL texture and creates mipmaps, generates a texture via glGenTextures, binds the current OpenIL image to it, generates mipmaps via gluBuild2DMipmaps and returns the texture name. This function is a more general purpose version of ilutOglBindTexImage.
ilutGLBuildMipmaps generates mipmaps via gluBuild2DMipmaps from an image. This function is similar to ilutGLTexImage but creates mipmaps.
ilutGLLoadImage loads an image directly to an OpenGL texture, skipping the use of OpenIL image names.
Name of the image to load
ilutGLScreen copies the current OpenGL window contents to the current bound image, effectively taking a screenshot. The new image attributes are that of the current OpenGL window's.
ilutGLScreen copies the current OpenGL window contents to a temporary image, effectively taking a screenshot. The screenshot image is then saved to disk as screen0.tga - screen127.tga (the lowest name it can find). This is just a convenience function that uses ilutGLScreen.
The ilutGLTexImage function binds an image to an OpenGL texture, simply calls glTexImage2D with the current bound image's data and attributes.
Texture level to place the image at. 0 is the base image level, and anything lower is a mipmap. Use ilActiveMipmap to access OpenIL's mipmaps.
ilutConvertToHBitmap creates a Windows bitmap handle (HBITMAP) copy of the current image, for direct use in Windows.
The ilutGetBoolean returns the value of a selected mode.
ilutGetBmpInfo fills a BITMAPINFO struct with the current image's information. The BITMAPINFO struct is used commonly used in Windows applications.
BITMAPINFO struct pointer to be filled.
The ilutGetHPal function returns a Windows-friendly palette. If the current bound image has a palette, ilutGetHPal returns a Windows-compatible copy of the current image's palette in HPAL format.
ilutGetPaddedData gets a copy of the current image's data, but pads it to be DWORD-aligned, just how Windows likes it. Almost all Windows functions that use images expect the images to be DWORD-aligned. The caller is responsible for freeing the memory returned by ilutGetPaddedData.
ilutGetWinClipboard copies the contents of the Windows clipboard to the current bound image, resizing as necessary.
ilutLoadResource is a Windows-specific function that loads a resource as the current bound image. This feature allows you to have images directly in your .exe and not worry whether a particular file is present on the user's harddrive. An alternative, more portable solution is to use ilSave with IL_CHEAD as the Type parameter.
The application-s HINSTANCE
The resource identifier of the resource to be loaded
The type of user-defined resource (name used when creating)
The type of image to be loaded. Use IL_TYPE_UNKNOWN to let OpenIL determine the type
ilutSetHBitmap copies Bitmap to the current bound image in a format OpenIL can understand. The image can then be used just as if you had loaded an image via ilLoadImage. This function is the opposite of ilutConvertToHBitmap.
Bitmap to copy to the current bound image.
ilutSetHPal sets the current iamge's palette from a logical Windows palette handle specified in Pal. If the current image is not colour-indexed, the palette is still loaded, though it will never be used.
A Windows palette to set the palette from
ilutSetWinClipboard copies the current bound image to the Windows clipboard.
loads an image directly to a Win32 HBITMAP, skipping the use of OpenIL image names.
Name of the image to load
Device context the bitmap should reside in
ilutWinSaveImage saves Bitmap to FileName. This function is the complement of ilutWinLoadImage.
Name of the image file to save to
Win32 HBITMAP to save from
The ilutD3D8VolumeTexture function creates a Direct3D 8 texture (IDirect3DVolumeTexture8) from the current bound image.
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
ilutD3D8VolTexFromFile loads the file named by FileName and converts it to a Direct3D 8 volume texture (IDirect3DVolumeTexture8). This function creates the texture, so the pointer does not even have to be allocated beforehand. This function is functionally equivalent to D3DX's D3DXCreateTextureFromFile but for a volume texture.
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
File to create the texture from.
Address of a pointer to an IDirect3DVolumeTexture8 interface, representing the created texture object.
ilutD3D8TexFromFileInMemory loads the file present in Lump and converts it to a Direct3D 8 texture (IDirect3DTexture8). This function creates the texture, so the pointer does not even have to be allocated beforehand. This function is functionally equivalent to D3DX's D3DXCreateTextureFromFileInMemory.
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
Location of memory file.
Size of Lump in bytes
Address of a pointer to an IDirect3DTexture8 interface, representing the created texture object.
ilutD3D8VolTexFromFileInMemory loads the file present in Lump and converts it to a Direct3D 8 volume texture (IDirect3DVolumeTexture8). This function creates the texture, so the pointer does not even have to be allocated beforehand. This function is functionally equivalent to D3DX's D3DXCreateTextureFromFileInMemory but for a volume texture.
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
Location of memory file.
Size of Lump in bytes
Address of a pointer to an IDirect3DTexture8 interface, representing the created texture object.
ilutD3D8TexFromFileInMemory loads the file present in Lump and converts it to a Direct3D 8 texture (IDirect3DTexture8). This function creates the texture, so the pointer does not even have to be allocated beforehand. This function is functionally equivalent to D3DX's D3DXCreateTextureFromFileInMemory.
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
Location of memory file.
Size of Lump in bytes
Address of a pointer to an IDirect3DTexture8 interface, representing the created texture object.
ilutD3D8VolTexFromFileInMemory loads the file present in Lump and converts it to a Direct3D 8 volume texture (IDirect3DVolumeTexture8). This function creates the texture, so the pointer does not even have to be allocated beforehand. This function is functionally equivalent to D3DX's D3DXCreateTextureFromFileInMemory but for a volume texture.
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
Location of memory file.
Size of Lump in bytes
Address of a pointer to an IDirect3DTexture8 interface, representing the created texture object.
ilutD3D8TexFromFileInMemory loads the file present in Lump and converts it to a Direct3D 8 texture (IDirect3DTexture8). This function creates the texture, so the pointer does not even have to be allocated beforehand. This function is functionally equivalent to D3DX's D3DXCreateTextureFromFile but with a file handle.
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
File handle containing the image file
Address of a pointer to an IDirect3DTexture8 interface, representing the created texture object.
ilutD3D8VolTexFromFileHandle loads the file present in File and converts it to a Direct3D 8 volume texture (IDirect3DVolumeTexture8). This function creates the texture, so the pointer does not even have to be allocated beforehand. This function is functionally equivalent to D3DX's D3DXCreateTextureFromFile but with a file handle and a volume texture.
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
File handle containing the image file
Address of a pointer to an IDirect3DTexture8 interface, representing the created texture object.
DevIL (Developer's Image Library) IL binding for .NET, implementing DevIL 1.6.8 RC2.
Specifies the calling convention.
Specifies .
Specifies the DevIL native library used in the bindings
The Windows dll is specified here universally - note that
under Mono the non-windows native library can be mapped using
the ".config" file mechanism. Kudos to the Mono team for this
simple yet elegant solution.
Describes the OpenIL vendor and should be used only with ilGetString
Used to retrive a string describing the current OpenIL version.
Preserves the origin state set by ilOriginFunc.
Preserves whether OpenIL is allowed to overwrite files when saving (set by ilEnable, ilDisable).
d to truecolour images (set by , ).
Preserves all OpenIL states and attributes.
Tells OpenIL to try to determine the type of image present in FileName, File or Lump.
Microsoft bitmap .
Dr. Halo .cut image.
Doom texture.
Doom flat (floor).
Microsoft icon (.ico).
Jpeg.
Kodak PhotoCD image.
.pcx Image.
Softimage Pic image.
Portable Network Graphics (.png) image.
Portable AnyMap (.pbm, .pgm or .ppm).
SGI (.bw, .rgb, .rgba or .sgi).
TrueVision Targa.
TIFF (.tif or .tiff) image.
C Header.
Raw data with a 13-byte header.
Half-Life model file (.mdl).
Quake .wal texture.
Homeworld image.
Load a Multiple Network Graphics (.mng).
Graphics Interchange Format file.
DirectDraw Surface image.
.dcx image.
PhotoShop (.psd) file.
Paint Shop Pro file.
Alias | Wavefront .pix file.
Pxrar (.pxr) file.
.xpm file.
RADIANCE High Dynamic Range Image.
Load the file into the current image's palette as a Paint Shop Pro (Jasc) palette.
No detectable error has occured.
An invalid value have been used, which was not part of the set of values that can be used. In the function documentation there should be a more specific descriptionanation.
Could not allocate enough memory for the image data.
The format a function tried to use was not able to be used by that function.
A serious error has occurred.
An invalid value was passed to a function or was in a file.
The operation attempted is not allowable in the current state. The function returns with no ill side effects. Generally there is currently no image bound or it has been deleted via ilDeleteImages. You should use ilGenImages and ilBindImage before calling the function.
An illegal value was found in a file trying to be loaded.
s header was incorrect.
An invalid value have been used, which was not part of the set of values that can be used. In the function documentation there should be a more specific descriptionanation.
Could not open the file specified. The file may already be open by another app or may not exist.
The extension of the specified filename was not correct for the type of image-loading function.
The filename specified already belongs to another file. To overwrite files by default read more at ilEnable function.
Tried to convert an image from its format to the same format.
One of the internal stacks was already filled, and the user tried to add on to the full stack.
One of the internal stacks was empty, and the user tried to empty the already empty stack.
During a conversion destination format and/or dest type was an invalid identifier. In the function documentation there should be a more specific descriptionanation.
An error occurred in the libjpeg library.
An error occurred in the libpng library.
No function sets this yet, but it is possible (not probable) it may be used in the future.
nabled, the origin is specified at an absolute position, and all images loaded or saved adhere to this set origin. For more information, check out ilOriginFunc.
Returns the current origin position.
Returns whether all images loaded are converted to a specific format.
Returns whether all images loaded are converted to a specific type.
Returns the type images are converted to upon loading.
Returns whether file overwriting when saving is enabled.
d images to their base types, e.g. converting to a bgra image.
Returns whether OpenIL uses a key colour (not used yet).
Returns whether OpenIL uses a key colour (not used yet).
/
Makes the target use a faster but more memory-intensive algorithm.
Makes the target use less memory but a potentially slower algorithm.
The client does not have a preference.
Controls the memory used vs. speed tradeoff.
Specifies that OpenIL should use compression when saving, if possible.
Specifies that OpenIL should never use compression when saving.
Controls whether compression is used when saving images.
/
Returns the version number of the shared library. This can be checked against the IL_VERSION #define.
s width.
s height.
s data.
s data.
Returns the current image format.
Returns the current images type.
Returns the palette type of the current image.
Returns the bytes per pixel of the current images palette.
Returns the number of colours of the current images palette.
Returns the number of images in the current image animation chain.
Returns the number of mipmaps of the current image.
/
Returns the current image number.
Returns the current mipmap number.
Returns the current layer number.
Returns the current bound image name.
ilActiveImage sets the current image to be an image in an animation chain
Animation numer to select as current.
ilActiveLayer is not yet used.
Layer number to select as current.
ilActiveMipmap sets a mipmap of the image as the current mipmap. Currently, the only way to generate mipmaps is by calling iluBuildMipmaps. If neither function has been called for the current image, no mipmaps exist for it. If Number is 0, then the current base image is set.
Mipmap level to select as current.
iluApplyProfile applies a colour profile (files with extension .icm) to the currently bound image. InProfile describes the current image's colour space, and OutProfile describes the colour space to convert the currently bound image to. If InProfile is NULL, DevIL attempts to use the colour profile present in the image, if one is present, else it returns IL_FALSE.
Profile file describing the colour space the image is in.
Profile file describing the colour space to convert the image to.
s, with zero being reserved as the default image. The default image is generated by ilCreateDefaultTex. The only reason the default image would be NULL is if OpenIL could not create the default image, due to memory constraints of the system, so always heed the IL_OUT_OF_MEMORY error. Any dimension image may be bound with ilBindImage. When ilBindImage is called, the bound image remains bound until ilBindImage is called again with a different value in Image.
The name of an image.
ilClearColour sets the current clearing colour to be used by future calls to ilClearImage. iluRotate and iluEnlargeCanvas both use these values to clear blank space in images, too.
Amount of red to clear to.
Amount of green to clear to.
Amount of blue to clear to.
Amount of alpha to clear to.
ilClearImage simply clears the image to the colours specified in ilClearColour. If the current image is of format IL_COLOR_INDEX, the image is cleared to all zeros, and the palette is changed to one entry of all zeros. If the current image is of format IL_LUMINANCE, the image is cleared to all zeros.
ilCloneCurImage creates a copy of the current image and returns the id of the new image. If a subimage of the current image is currently selected via ilActiveImage, ilActiveLayer or ilActiveMipmap, the subimage is copied, not the base image.
ilConvertImage converts the current bound image from its format/type to DestFormat and DestType. Almost all conversions are allowable.
The format the current image should be converted to.
The type the current image should be converted to.
ilIsImage returns whether the image name in Image is a valid image in use. If the image name in Image is in use, ilIsImage returns IL_TRUE. If Image is 0, ilIsImage returns IL_FALSE, because the default image is a special image and is never returned by ilGenImages. If the image name has been deleted by ilDeleteImages or never generated byilGenImages, IL_FALSE is returned.
The format the current image palette should be converted to. Accepted Values are: , , , , , .
ilCopyImage copies the attributes and data from the image named in Src. The same image bound before calling ilCopyImage remains bound afterward.
Name of an image to copy to the current image.
s width, height or depth number of pixels will be copied to Data.
Where to begin copying pixels from in the x direction.
Where to begin copying pixels from in the y direction.
Where to begin copying pixels from in the z direction.
How many pixels to copy in the x direction.
How many pixels to copy in the y direction.
How many pixels to copy in the z direction.
The desired format the output should be.
The desired type the output should be.
User-defined buffer to copy the image data to.
ilDefaultImage creates an ugly 64x64 image of 8x8 black and yellow squares to form a checkerboard pattern. In future versions of OpenIL, there may be an option that will load this image if an image-loading function failed (unless memory could not be allocated). This way, the user can easily tell if an image was not loaded. Plus, the calling program can continue normally, even though it will have an ugly image.
ilDeleteImages deletes Num image names specified in Image. After a texture is deleted, its characteristics and dimensions are undefined, and the name may be reused byilGenImages. ilDeleteImages ignores zeros and out-of-bounds image names. If the current image is deleted, the binding reverts to the default image (image name of 0).
Number of image names to delete.
Pointer to image names to delete.
ilDeleteImages deletes Num image names specified in Images. After a texture is deleted, its characteristics and dimensions are undefined, and the name may be reused byilGenImages. ilDeleteImages ignores zeros and out-of-bounds image names. If the current image is deleted, the binding reverts to the default image (image name of 0).
Number of image names to delete.
Pointer to image names to delete.
s OpenGL counterpart glDisable.
Mode to disable.
- When enabled, OpenIL automatically converts palette'd images to their base types, e.g. converting to a bgra image.
- If enabled while saving, OpenIL will overwrite existing files, else is set, and the image is not saved.
- When enabled, the origin is specified at an absolute position, and all images loaded or saved adhere to this set origin. For more information, check out .
s OpenGL counterpart glEnable.
Mode to enable.
- When enabled, OpenIL automatically converts palette'd images to their base types, e.g. converting to a bgra image.
- If enabled while saving, OpenIL will overwrite existing files, else is set, and the image is not saved.
- When enabled, the origin is specified at an absolute position, and all images loaded or saved adhere to this set origin. For more information, check out .
ilGenImages stores Num image names in Images. The names stored are not necessarily contiguous, and names can have been deleted via ilDeleteImages beforehand. The image names stored in Images can be used with ilBindImage after calling ilGenImages. After calling ilGenImages, all image dimensions and features are undefined.
Number of image names to generate.
Pointer in which the generated image names are stored.
ilGenImages stores Num image names in Images. The names stored are not necessarily contiguous, and names can have been deleted via ilDeleteImages beforehand. The image names stored in Images can be used with ilBindImage after calling ilGenImages. After calling ilGenImages, all image dimensions and features are undefined.
Number of image names to generate.
Pointer in which the generated image names are stored.
ilGetBoolean returns the value of a selected mode.
The mode value to be returned.
- Returns the current image number.
- Returns the current layer number.
- Returns the current mipmap number..
- Returns whether palette'd images are converted to their base palettes types on load - e.g. converted to a bgra image.
- Returns the current bound image name.
- Returns whether file overwriting when saving is enabled.
- Returns the format images are converted to upon loading.
- Returns whether all images loaded are converted to a specific format.
- Returns the bits per pixel of the current image's data.
- Returns the bytes per pixel of the current image's data.
- Returns the current image's format.
- Returns the current image's height.
- Returns the current image's type.
- Returns the current image's width.
- Returns the number of images in the current image animation chain.
- Returns the number of mipmaps of the current image.
- Returns the current origin position.
- Returns whether all images loaded and saved adhere to a specific origin.
- Returns the bytes per pixel of the current image's palette.
- Returns the number of colours of the current image's palette.
- Returns the palette type of the current image.
- Returns the type images are converted to upon loading.
- Returns whether all images loaded are converted to a specific type.
- Returns whether OpenIL uses a key colour (not used yet).
- Returns the version number of the shared library. This can be checked against the #define.
ilGetBooleanv function returns the mode value in the Param parameter.
The mode value to be returned.
Array where the values are stored
- Returns the current image number.
- Returns the current layer number.
- Returns the current mipmap number..
- Returns whether palette'd images are converted to their base palettes types on load - e.g. converted to a bgra image.
- Returns the current bound image name.
- Returns whether file overwriting when saving is enabled.
- Returns the format images are converted to upon loading.
- Returns whether all images loaded are converted to a specific format.
- Returns the bits per pixel of the current image's data.
- Returns the bytes per pixel of the current image's data.
- Returns the current image's format.
- Returns the current image's height.
- Returns the current image's type.
- Returns the current image's width.
- Returns the number of images in the current image animation chain.
- Returns the number of mipmaps of the current image.
- Returns the current origin position.
- Returns whether all images loaded and saved adhere to a specific origin.
- Returns the bytes per pixel of the current image's palette.
- Returns the number of colours of the current image's palette.
- Returns the palette type of the current image.
- Returns the type images are converted to upon loading.
- Returns whether all images loaded are converted to a specific type.
- Returns whether OpenIL uses a key colour (not used yet).
- Returns the version number of the shared library. This can be checked against the #define.
s data to allow direct access and modification to the contents of the image.
Errors that occur in ILU and ILUT are also reported through ilGetError. ilGetError only returns something other than IL_NO_ERROR if detectable errors have occurred.
ilGetInteger returns the value of a selected mode.
The mode value to be returned.
ilGetIntegerv function returns the mode value in the Param parameter.
The mode value to be returned.
Array where the values are stored
ilGetIntegerv function returns the mode value in the Param parameter.
The mode value to be returned.
Array where the values are stored
ilGetPalette returns an unsigned byte pointer to the current bound image's palette (if one exists) to allow direct access and modification to the contents of the palette.
ilGetString returns a constant human-readable string describing the current OpenIL implementation.
Describes the string to be retrieved.
s behaviour, in order to optimize either speed, memory, compression or quality, depending wholly on what the user desires.
An enum indicating what behaviour of the library is to be controlled.
The desired behaviour.
ilInit starts DevIL and must be called prior to using DevIL, or else DevIL will probably crash when you attempt to use it.
ilIsDisabled returns whether the mode indicated by Mode is disabled.
Indicates an OpenIL mode
ilIsEnabled returns whether the mode indicated by Mode is enabled.
Indicates an OpenIL mode
ilIsImage returns whether the image name in Image is a valid image in use. If the image name in Image is in use, ilIsImage returns IL_TRUE. If Image is 0, ilIsImage returns IL_FALSE, because the default image is a special image and is never returned by ilGenImages. If the image name has been deleted by ilDeleteImages or never generated byilGenImages, IL_FALSE is returned.
An image name.
ilLoad can be used much in the same way ilLoadImage is used, except with ilLoad, it is possible to force OpenIL to load a file as a specific image format, no matter what the extension.
Format Specification
File to load the image
ilLoadF loads an image from a previously opened file
Image format
Pointer to a previous opened file
The ilLoadImage function allows a general interface to the specific internal file-loading routines. The approach ilLoadImage takes toward determining image types is three-pronged. 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.
Specifies which file to load an image from.
ilLoadL loads an image from a memory lump
Image format
Lump Address
Lump size
ilLoadL loads an image from a memory lump
Image format
Lump Address
Lump size
ilLoadPal simply loads a palette from the file specified by FileName into the current bound image's palette. If the current bound image is not of type IL_COLOR_INDEX, the palette is not used, but it is loaded nonetheless. ilLoadPal can load .col, Halo and Jasc PSP palette files.
Filename to load the palette data from.
ilOriginFunc sets the origin to be used when loading all images, so that any image with a different origin will be flipped to have the set origin. This behaviour is actually disabled by default but can be enabled using ilEnable with the IL_ORIGIN_SET parameter.
Specifies the origin to be used
The ilOverlayImage function copies the image named by Src onto the current bound image. XCoord, YCoord and ZCoord are allowed to be any number, even negative numbers, for if you want to start copying Src in the middle of it to the current image's left side. If the image named by Src has alpha components, then blending will occur, instead of just a simple overlay.
The image to copy.
The starting x position of the current image to copy Src to.
The starting y position of the current image to copy Src to.
The starting z position of the current image to copy Src to.
ilPopAttrib pops the last pushed stack entry off the stack and copies the bits specified when pushed by ilPushAttrib to the previous set of states.
Attribute bits to push.
ilRegisterFormat tells OpenIL what format the current registered image is in. This function is to be used from within functions that have been registered via ilRegisterLoad
The format that the registered image is in.
ilRegisterLoad allows the user to register functions for use by OpenIL, when loading unknown image types. The user can also override the default internal loading functions by passing their extension in Ext when using ilLoadImage. ilRegisterLoad allows the user to use their own loading functions while using OpenIL's capabilities, or to extend OpenIL when it does not support a specific image format
Extension of the image type to load
Pointer to a loading function
ilRegisterMipNum tells OpenIL the number of mipmaps the current image has. The mipmaps can then be chosen and modified via ilActiveMipmap. This function is to be used from within functions that have been registered via ilRegisterLoad.
Number of mipmaps to create.
ilRegisterNumImages tells OpenIL the number of images in the current image's animation chain. The "next" images can then be chosen and modified via ilActiveImage. This function is to be used from within functions that have been registered via ilRegisterLoad.
Number of images in the animation chain to create.
ilRegisterFormat tells OpenIL what format the current registered image is in. This function is to be used from within functions that have been registered via ilRegisterLoad
The new Origin of the image
The ilRegisterPal function registers the current image's palette.
Pointer to palette to be copied to the current image
Size of Pal in bytes
Type of the palette.
ilRegisterType tells OpenIL what datatype the current registered image uses. This function is to be used from within functions that have been registered via ilRegisterLoad.
Extension of the image type to save
Pointer to a saving function
ilRegisterType tells OpenIL what datatype the current registered image uses. This function is to be used from within functions that have been registered via ilRegisterLoad.
The type the current image should be converted to.
ilRemoveLoad removes a registered extension handler from the registered load functions list. Use this function when a new handler for an extension needs to be registered.
Extension to remove (e.g. tga).
ilRemoveSave removes a registered extension handler from the registered save functions list. Use this function when a new handler for an extension needs to be registered.
Extension to remove (e.g. tga).
ilResetRead resets the reading functions set by ilSetRead.
ilResetWrite resets the writing functions set by ilSetWrite.
ilSave can be used much in the same way ilSaveImage is used, except with ilSave, it is possible to force OpenIL to save a file as a specific image format, no matter what the extension.
Image format.
The filename of the file to save to.
ilSaveF saves an image to a previously opened file
Image format
Pointer to a previous opened file
Specifies which file to save an image to
ilSaveL saves an image to a memory lump
Image format
Lump Address
Lump size
ilSaveL saves an image to a memory lump
Image format
Lump Address
Lump size
If the current bound image has a palette, ilSavePal saves the current image's palette to the file specified by FileName. Currently, OpenIL only supports saving to Paint Shop Pro .pal files.
Filename to save the palette data to.
ilSetData just updates the current bound image data (bound by ilBindImage) with new data of the same size. This way new memory does not have to be allocated, so transfers are much faster.
Specifies the new image data to update the image with.
ilSetDuration allows you to set how long to show the currently bound image. This function can also change the durations of individual images in animation chains.
Number of milliseconds to play the currently bound image.
The ilSetInteger function sets the value of a selected mode. it's the ilGetInteger's counterpart
The mode value to be modified.
The value to set the mode with.
ilSetMemory was created to let DevIL users override the default memory allocation and deallocation functions present in DevIL. This support can be useful if you are using your own optimized memory handler or anything similar.
Specifies a function to override DevIL's allocation function.
Specifies a function to override DevIL's deallocation function.
ilCopyPixels has very simple behaviour. It simply copies a block of pixels from the Data buffer to the current image's data. XOff, YOff and ZOff can be used to skip a certain number of pixels in each respective direction. If XOff + Width, YOff + Height and/or ZOff + Depth is greater than the current image's width, height or depth, only the current image's width, height or depth number of pixels will be copied to the current image's data buffer.
Where to begin copying pixels to in the x direction.
Where to begin copying pixels to in the y direction.
Where to begin copying pixels to in the z direction.
How many pixels to copy in the x direction.
How many pixels to copy in the y direction.
How many pixels to copy in the z direction.
The format the input is.
The type the input is.
User-defined buffer to copy the image data to.
datatype ILHANDLE is passed to these functions when used, so any internal datatype used by the differing language (or file handle) can be used.
Pointer to a function to open a file.
Pointer to a function to close a file.
Pointer to a function that returns IL_TRUE if the end of file is reached.
Pointer to a function to return one byte from a file.
Pointer to a function to read multiple bytes from a file.
Pointer to a function to change position in a file.
Pointer to a function to report the position in a file.
ilSetString gives DevIL users the option to set strings in certain file formats that have fields for strings, making DevIL highly customizable. Choose one of the acceptable parameters for Mode and specify any string you want. If the string is too long, it will be truncated when writing to the file.
Specifies the string to be set.
String to use for setting a string field of a specified image format.
ilSetWrite allows you to override the default DevIL saving functions with your own. You are virtually unlimited in how your functions work, as long as they have the same behaviour as DevIL's default saving functions. All the functions work on the ILHANDLE type, which is a just a void pointer.
Pointer to a function to open a file.
Pointer to a function to close a file.
Pointer to a function to write one byte to a file.
Pointer to a function to change position in a file.
Pointer to a function to report the position in a file.
Pointer to a function to write multiple bytes to a file.
Any current image data is destroyed by ilTexImage and replaced by a new image with the attributes specified. The new image data has undefined values. To set the new image data to a certain value, use ilClearImage or ilClearImageTo.
Specifies the new image width. This cannot be 0.
Specifies the new image height. This cannot be 0.
Specifies the new image depth. Anything greater than 1 will make the image 3d. This cannot be 0.
Specifies the new channels. Common values are 3 and 4.
Specifies the data format this image has. For a list of values this can be, see the See Also section.
Specifies the data format this image has. For a list of values this can be, see the See Also section.
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.
DevIL (Developer's Image Library) ILU binding for .NET.
Specifies the calling convention.
Specifies for Windows and
Linux.
Specifies the DevIL ILU native library used in the bindings
The Windows dll is specified here universally - note that
under Mono the non-windows native library can be mapped using
the ".config" file mechanism. Kudos to the Mono team for this
simple yet elegant solution.
A Parameter was invalid or out of range
Could not allocate enough memory in an operation
A serious error has occurred.
An invalid value was passed to a function or was in a file
The operation attempted is not allowable in the current state. The function returns with no ill side effects. Generally there is currently no image bound or it has been deleted via ilDeleteImages. You should use ilGenImages and ilBindImage before calling the function.
A Parameter was invalid or out of range
The story behind this function is actually sorta funny. I had been using a picture of me (contact me if you want it! =) as a test image, and I started working on some colour matrix filters. Well, my first attempt screwed-up, because I had changed the equations to accomodate my bgr image, but I transposed the equations entirely wrong. I got a really neat output, though, where I looked like an alien. =) I decided to keep the screw-up and placed it in iluAlienify. I can't say I've ever run across a filter like this before.
iluBlurAvg blurs an image using an averaging convolution filter. The filter is applied up to Iter number of times, giving more of a blurring effect the higher Iter is.
Number of iterations of blurring to perform.
iluBlurGaussian blurs an image using a Gaussian convolution filter, which usually gives better results than the filter used by iluBlurAvg. The filter is applied up to Iter number of times, giving more of a blurring effect the higher Iter is.
Number of iterations of blurring to perform.
iluBuildMipmaps generates power-of-2 mipmaps for an image. If the image does not have power-of-2 dimensions, then the image is resized via iluScale. Mipmaps are then generated for the image, down to a 1x1 image. To use the mipmaps, see ilActiveMipmap.
iluColoursUsed creates a copy of the image data, quicksorts it and counts the number of unique colours in the image. This value is returned without affecting the original image.
iluCompareImage compares the current image to the image having the name in Comp. If both images are identical, IL_TRUE is returned. IL_FALSE is returned if the images are not identical. The bound image before calling this function remains the bound image after calling ilCompareImage.
The image to compare with.
iluContrast changes the contrast of an image by using interpolation and extrapolation. Common values for Contrast are in the range -0.5 to 1.7. Anything below 0.0 generates a negative of the image with varying contrast. 1.0 outputs the original image. 0.0 - 1.0 lowers the contrast of the image. 1.0 - 1.7 increases the contrast of the image. This effect is caused by interpolating (or extrapolating) the source image with a totally grey image.
The factor to contrast by
iluCrop "crops" the current image to new dimensions. The new image appears the same as the original, but portions of the image are clipped-off, depending on the values of the parameters of these functions. If XOff + Width, YOff + Height or ZOff + Depth is larger than the current image's dimensions, ILU_ILLEGAL_OPERATION is set. If ZOff is minus or equal to one the crop will be done only on 2 dimensions
Number of pixels to skip in the x direction.
Number of pixels to skip in the y direction.
Number of pixels to skip in the z direction.
Number of pixels to preserve in the x direction.
Number of pixels to preserve in the y direction.
Number of pixels to preserve in the z direction.
iluDeleteImage is a convenience function to delete a single image instead of calling ilDeleteImages
The image name to delete
iluEdgeDetectP detects the edges in the current image by combining two convolution filters. The filters used are Prewitt filters.
iluEdgeDetectP detects the edges in the current image by combining two convolution filters. The filters used are Prewitt filters.
iluEdgeDetectS detects the edges in the current image by combining two convolution filters. The filters used are Sobel filters.
iluEmboss embosses an image, causing it to have a "relief" feel to it using a convolution filter:
iluEnlargeCanvas enlarges the canvas of the current image, clearing the background to the colour specified in ilClearColour. To control the placement of the image, use iluImageParameter
New image width - must be larger than the current image's width.
New image height - must be larger than the current image's width.
New image depth - must be larger than the current image's width.
iluErrorString returns a human-readable string of the error in Error. This can be useful for displaying the human-readable error in your program to let the user know wtf just happened.
Enum that describes the string to be retrieved.
iluFlipImage inverts an image over the x axis. The image will be upside-down after calling this function. If this function is called twice in succession, the image is restored to its original state. A version of this function in OpenIL is used throughout internally when loading images to correct images that would otherwise be upside-down. Using ilOriginFunc will essentially tell the library which way is up.
reater than 1.0, the image is brightened. It uses interpolation so it's slower then iluGammaCorrectScale
Gamma correction.
iluGenImage is a convenience function to delete a single image instead of calling ilGenImages
The iluGetImageInfo function retrieves information about the current image in an ILinfo struct. This is useful when you are repeatedly calling ilGetInteger and is more efficient in this case.
ILinfo struct to receive the image information.
The iluGetInteger function returns the value of a selected mode
The mode value to be returned.
The iluGetIntegerv function returns the mode value in the Param parameter.
The mode value to be returned.
When used, the value is stored here instead of returned..
iluGetString returns a constant human-readable string describing the current OpenILU implementation.
Enum that describes the string to be retrieved.
iluImageParameter modifies the behaviour of some ilu functions. Right now, it controls the behaviour of iluEnlargeCanvas and iluScale. For ILU_FILTER, values for Param other than ILU_NEAREST, ILU_LINEAR and ILU_BILINEAR are higher-quality scaling filters and take longer to perform.
Parameter name
Behaviour to use
iluInit starts ILU and must be called prior to using ILU
iluInvertAlpha inverts the alpha of the currently bound image.
iluMirror mirrors an image across its y axis, making it appear backwards.
iluNegative creates a negative version of an image, like it was viewed as a picture negative instead of the actual picture. The effect is caused by inverting the image's colours, such as a green pixel would become purple (red-blue).
iluPixelize performs the effect that can be seen on television, where people want their identity to remain anonymous, so the editors cover the person's face with a very blocky pixelized version. PixSize specifies how blocky the image should be, with 1 being the lowest blockiness (doesn't change the image).
New pixel size
iluRotate simply rotates an image about the center by Angle degrees. The background where there is space left by the rotation will be set to the clear colour.
Angle in degrees to rotate the image.
iluSaturate1f applies a saturation consistent with the IL_LUMINANCE conversion values to red, green and blue.
Amount of saturation to apply to the current bound image. the value must go from -1.0 to 1.0
iluScaleColours scales the individual colour components of the current bound image. Using 1.0f as any of the parameters yields that colour component's original plane in the new image.
Amount of red to use from the original image
Amount of green to use from the original image
Amount of blue to use from the original image
The iluScale function scales the image to the new dimensions specified, shrinking or enlarging the image, depending on the image's original dimensions. There are different filters that can be used to scale an image, and which filter to use can be specified via iluImageParameter.
New width of the image.
New height of the image.
New depth of the image.
iluSharpen can actually either sharpen or blur an image, depending on the value of Factor. iluBlurAvg and iluBlurGaussian are much faster for blurring, though. When Factor is 1.0, the image goes unchanged. When Factor is in the range 0.0 - 1.0, the current image is blurred. When Factor is in the range 1.0 - 2.5, the current image is sharpened. To achieve a more pronounced sharpening/blurring effect, simply increase the number of iterations by increasing the value passed in Iter.
Factor to sharpen by.
Number of iterations to perform on the image.
iluSwapColours "swaps" the colour order of the current image. If the current image is in bgr(a) format, iluSwapColours will change the image to use rgb(a) format, or vice-versa. This can be helpful when you want to manipulate the image data yourself but only want to use a certain colour order. To determine the current colour order, call ilGetInteger with the IL_IMAGE_FORMAT parameter.
/\