kolrabi's another Image Library  1.11.0
 All Files Functions Groups Pages
Image Manipulation

Perform operations on images. More...

Functions

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...
 
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 ilClampNTSC (void)
 Clamps data values of unsigned bytes from 16 to 235 for display on an NTSC television. More...
 
ILboolean ILAPIENTRY ilClearImage ()
 Clears the current bound image to the values specified in ilClearColour().
 
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.
 
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 ilModAlpha (ILdouble AlphaValue)
 Adds an alpha channel if not present and sets it to the given value. 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.
 
ILboolean ILAPIENTRY ilRemoveAlpha ()
 Removes the alpha channel from the currently bound image. More...
 
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...
 
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 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...
 

Detailed Description

Perform operations on images.

Function Documentation

ILboolean ILAPIENTRY ilAddAlpha ( )

Adds an opaque alpha channel to the currently bound image.

If IL_USE_KEY_COLOUR is enabled, the colour set with ilKeyColour will be transparent.

Since
1.9.0
ILboolean ILAPIENTRY ilApplyProfile ( ILstring  InProfile,
ILstring  OutProfile 
)

Apply a colour profile to the currently bound image.

Profile names must be the file names of valid ICC profiles.

Parameters
InProfileName of the image's current colour profile.
OutProfileName of the colour profile to apply.
Note
If the image library has been built without LCMS2 support, this will have no effect.
ILboolean ILAPIENTRY ilClampNTSC ( void  )

Clamps data values of unsigned bytes from 16 to 235 for display on an NTSC television.

Reasoning for this is given at http://msdn.microsoft.com/en-us/library/bb174608.aspx

ILboolean ILAPIENTRY ilConvertImage ( ILenum  DestFormat,
ILenum  DestType 
)

Converts the current image to the DestFormat format.

Parameters
DestFormatAn enum of the desired output format. Any format values are accepted.
DestTypeAn enum of the desired output type. Any type values are accepted.
Exceptions
IL_ILLEGAL_OPERATIONNo currently bound image
IL_INVALID_CONVERSIONDestFormat or DestType was an invalid identifier.
IL_OUT_OF_MEMORYCould not allocate enough memory.
Returns
Boolean value of failure or success
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.

Parameters
XOffLeft border of image subregion to copy in pixels.
YOffTop border of image subregion to copy in pixels.
ZOffFront border of image subregion to copy in slices.
WidthWidth of region to copy in pixels.
HeightHeight of region to copy in pixels.
DepthDepth of region to copy in slices.
FormatFormat of pixel data to get.
TypeUnderlying pixel data type.
DataBuffer to receive pixel data.
ILuint ILAPIENTRY ilCreateSubImage ( ILenum  Type,
ILuint  Num 
)

Creates sub images of the given type for the currently bound image.

The new sub images will be empty. Existing sub images of the type will be replaced. The current image binding will not be changed.

Parameters
TypeSub image type, can be IL_SUB_NEXT to create animation frames after the current image, IL_SUB_MIPMAP to create mipmaps or IL_SUB_LAYER to create layers.
NumThe number of images to create.
Returns
The number of images actually created.
Note
The original version behaved a little differently, it only created one sub image of the given type and the rest were added as frames in the animation chain. I believe this was a bug and fixed it. However if your program relied on that behaviour, it might be broken now. Be aware of that.
void ILAPIENTRY ilModAlpha ( ILdouble  AlphaValue)

Adds an alpha channel if not present and sets it to the given value.

Note
this is the same as ilSetAlpha
ILboolean ILAPIENTRY ilRemoveAlpha ( )

Removes the alpha channel from the currently bound image.

Since
1.11.0
ILboolean ILAPIENTRY ilSetAlpha ( ILdouble  AlphaValue)

Adds an alpha channel if not present and sets it to the given value.

Note
this is the same as ilModAlpha
ILboolean ILAPIENTRY ilSetData ( void *  Data)

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

Parameters
DataNew image data to update the currently bound image
Exceptions
IL_ILLEGAL_OPERATIONNo currently bound image
IL_INVALID_PARAMData was NULL.
Returns
Boolean value of failure or success
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
WidthSpecifies the new image width. This cannot be 0.
HeightSpecifies the new image height. This cannot be 0.
DepthSpecifies the new image depth. This cannot be 0.
BppNumber of channels (ex. 3 for RGB)
FormatEnum of the desired format. Any format values are accepted.
TypeEnum of the desired type. Any type values are accepted.
DataSpecifies 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_OPERATIONNo currently bound image.
IL_INVALID_PARAMOne of the parameters is incorrect, such as one of the dimensions being 0.
IL_OUT_OF_MEMORYCould not allocate enough memory.
Returns
Boolean value of failure or success
ILAPI ILboolean ILAPIENTRY ilTexImageDxtc ( ILuint  Width,
ILuint  Height,
ILuint  Depth,
ILenum  DxtFormat,
const ILubyte *  Data 
)

Sets the currently bound image data.

Like ilTexImage but from DXTC compressed data.

Parameters
WidthSpecifies the new image width. This cannot be 0.
HeightSpecifies the new image height. This cannot be 0.
DepthSpecifies the new image depth. This cannot be 0.
DxtFormatDescribes the DXT compression data format.
DataThe DTX compressed pixel data.