Tao.DevIl SDK Documentation

Il Methods

The methods of the Il class are listed below. For a complete list of Il class members, see the Il Members topic.

Public Static (Shared) Methods

ilActiveImage ilActiveImage sets the current image to be an image in an animation chain
ilActiveLayer ilActiveLayer is not yet used.
ilActiveMipmap 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.
ilApplyPal
ilApplyProfile 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.
ilBindImage 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.
ilBlit
ilClearColour 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.
ilClearImage 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 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.
ilCompressFunc
ilConvertImage ilConvertImage converts the current bound image from its format/type to DestFormat and DestType. Almost all conversions are allowable.
ilConvertPal 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.
ilCopyImage ilCopyImage copies the attributes and data from the image named in Src. The same image bound before calling ilCopyImage remains bound afterward.
ilCopyPixels s width, height or depth number of pixels will be copied to Data.
ilCreateSubImage
ilDefaultImage 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.
ilDeleteImage
ilDeleteImagesOverloaded. 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).
ilDisable s OpenGL counterpart glDisable.
ilEnable s OpenGL counterpart glEnable.
ilFormatFunc
ilGenImage
ilGenImagesOverloaded. 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.
ilGetAlpha
ilGetBoolean ilGetBoolean returns the value of a selected mode.
ilGetBooleanv ilGetBooleanv function returns the mode value in the Param parameter.
ilGetData s data to allow direct access and modification to the contents of the image.
ilGetDXTCData
ilGetError 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 ilGetInteger returns the value of a selected mode.
ilGetIntegervOverloaded. ilGetIntegerv function returns the mode value in the Param parameter.
ilGetLumpPos
ilGetPalette 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 ilGetString returns a constant human-readable string describing the current OpenIL implementation.
ilHint s behaviour, in order to optimize either speed, memory, compression or quality, depending wholly on what the user desires.
ilInit ilInit starts DevIL and must be called prior to using DevIL, or else DevIL will probably crash when you attempt to use it.
ilIsDisabled ilIsDisabled returns whether the mode indicated by Mode is disabled.
ilIsEnabled ilIsEnabled returns whether the mode indicated by Mode is enabled.
ilIsImage 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.
ilIsValid
ilIsValidF
ilIsValidLOverloaded.
ilKeyColour
ilLoad 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.
ilLoadData
ilLoadDataF
ilLoadDataLOverloaded.
ilLoadF ilLoadF loads an image from a previously opened file
ilLoadFromJpegStruct
ilLoadImage 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.
ilLoadLOverloaded. ilLoadL loads an image from a memory lump
ilLoadPal 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.
ilModAlpha
ilOriginFunc 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.
ilOverlayImage 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.
ilPopAttrib 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.
ilPushAttrib
ilRegisterFormat 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
ilRegisterLoad 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
ilRegisterMipNum 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.
ilRegisterNumImages 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.
ilRegisterOrigin 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
ilRegisterPal The ilRegisterPal function registers the current image's palette.
ilRegisterSave 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.
ilRegisterType 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.
ilRemoveLoad 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.
ilRemoveSave 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.
ilResetMemory
ilResetRead ilResetRead resets the reading functions set by ilSetRead.
ilResetWrite ilResetWrite resets the writing functions set by ilSetWrite.
ilSave 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.
ilSaveData
ilSaveF ilSaveF saves an image to a previously opened file
ilSaveFromJpegStruct
ilSaveImage
ilSaveLOverloaded. ilSaveL saves an image to a memory lump
ilSavePal 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.
ilSetAlpha
ilSetData 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.
ilSetDuration 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.
ilSetInteger The ilSetInteger function sets the value of a selected mode. it's the ilGetInteger's counterpart
ilSetMemory 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.
ilSetPixels 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.
ilSetRead datatype ILHANDLE is passed to these functions when used, so any internal datatype used by the differing language (or file handle) can be used.
ilSetString 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.
ilSetWrite 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.
ilShutDown
ilTexImage 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.
ilTypeFromExt
ilTypeFunc

Public Instance Methods

Equals (inherited from Object) 
GetHashCode (inherited from Object) 
GetType (inherited from Object) 
ToString (inherited from Object) 

See Also

Il Class | Tao.DevIl Namespace