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

General state and settings. More...

Functions

void ILAPIENTRY ilBindImage (ILuint Image)
 Makes Image the current active image - similar to glBindTexture(). More...
 
void ILAPIENTRY ilClearColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
 Set a new clear colour to use by ilClearImage().
 
void ILAPIENTRY ilClearIndex (ILuint Index)
 Set a new clear colour index to use by ilClearImage() when clearing paletted images. More...
 
ILboolean ILAPIENTRY ilDisable (ILenum Mode)
 Disables a mode. More...
 
ILboolean ILAPIENTRY ilEnable (ILenum Mode)
 Enables a mode. More...
 
ILboolean ILAPIENTRY ilFormatFunc (ILenum Mode)
 Set the default image format to use. 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.
 
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...
 
ILint ILAPIENTRY ilGetInteger (ILenum Mode)
 Returns the current value of the Mode. More...
 
ILuint ILAPIENTRY ilGetIntegerv (ILenum Mode, ILint *Param)
 Gets the current value(s) of the Mode. 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 ilIsDisabled (ILenum Mode)
 Checks whether a Mode is not enabled. More...
 
ILboolean ILAPIENTRY ilIsEnabled (ILenum Mode)
 Checks whether a Mode is enabled. More...
 
void ILAPIENTRY ilKeyColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
 Set the current color key.
 
ILboolean ILAPIENTRY ilOriginFunc (ILenum Mode)
 Sets the default origin to be used. More...
 
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 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 ilSetString (ILenum StringName, ILconst_string String)
 Sets a string detailing aspects about this library. More...
 
ILboolean ILAPIENTRY ilTypeFunc (ILenum Mode)
 Sets the default type to be used.
 

Detailed Description

General state and settings.

Function Documentation

void ILAPIENTRY ilBindImage ( ILuint  Image)

Makes Image the current active image - similar to glBindTexture().

This automatically resets the state to the first sub image, face (if applicable) and top level mipmap.

Parameters
ImageName of image to bind.
void ILAPIENTRY ilClearIndex ( ILuint  Index)

Set a new clear colour index to use by ilClearImage() when clearing paletted images.

Since
1.10.0
ILboolean ILAPIENTRY ilDisable ( ILenum  Mode)

Disables a mode.

Parameters
ModeMode to disable
Returns
IL_TRUE if successful.
See Also
ilEnable for a list of valid modes.
ilIsEnabled
ILboolean ILAPIENTRY ilEnable ( ILenum  Mode)

Enables a mode.

Valid modes are:

Mode Default Description
IL_BLIT_BLEND IL_FALSE When using ilBlit do alpha blending.
IL_ORIGIN_SET IL_FALSE Flip image on load to match IL_ORIGIN_MODE.
IL_FORMAT_SET IL_FALSE Convert image format on load to match the format set by ilFormatFunc().
IL_TYPE_SET IL_FALSE Convert image data type on load to match IL_TYPE_MODE.
IL_CONV_PAL IL_FALSE Convert images that use palettes on load to 24 bit RGBA.
IL_SQUISH_COMPRESS IL_FALSE Use libsquish for compressing DXT formats if available.
Parameters
ModeMode to enable
Returns
IL_TRUE if successful.
See Also
ilIsEnabled
ILboolean ILAPIENTRY ilFormatFunc ( ILenum  Mode)

Set the default image format to use.

Default value IL_BGRA. The current value can be retrieved by calling ilGetInteger with the parameter IL_FORMAT_MODE.

Parameters
ModeNew default format.
Returns
IL_TRUE if successful, on failure IL_FALSE is returned and an error is set.
ILenum ILAPIENTRY ilGetError ( void  )

Gets the last error on the error stack.

Returns
An enum describing the last error.
ILfloat ILAPIENTRY ilGetFloat ( ILenum  Mode)

Returns a current float value.

Right now the only valid Modes are rational meta data:

  • IL_META_EXPOSURE_TIME
  • IL_META_FSTOP
  • IL_META_SHUTTER_SPEED
  • IL_META_APERTURE
  • IL_META_BRIGHTNESS
  • IL_META_EXPOSURE_BIAS
  • IL_META_MAX_APERTURE
  • IL_META_SUBJECT_DISTANCE
  • IL_META_FOCAL_LENGTH
  • IL_META_FLASH_ENERGY
  • IL_META_X_RESOLUTION
  • IL_META_Y_RESOLUTION
  • IL_META_GPS_LATITUDE
  • IL_META_GPS_LONGITUDE
  • IL_META_GPS_ALTITUDE
  • IL_META_GPS_DOP
  • IL_META_GPS_SPEED
  • IL_META_GPS_TRACK
  • IL_META_GPS_IMAGE_DIRECTION
  • IL_META_GPS_DEST_LATITUDE
  • IL_META_GPS_DEST_LONGITUDE
  • IL_META_GPS_DEST_ALTITUDE
  • IL_META_GPS_DEST_BEARING
  • IL_META_GPS_DEST_DISTANCE

The rational value will be returned as a float.

See Also
ilGetIntegerv
ilGetMetadata
ilSetFloat
Since
1.10.0
ILfloat ILAPIENTRY ilGetFloatImage ( ILuint  ImageName,
ILenum  Mode 
)

Gets a current value from an image.

See Also
ilGetFloat
Since
1.10.0
ILuint ILAPIENTRY ilGetFloatv ( ILenum  Mode,
ILfloat *  Param 
)

Gets the current value(s) of the Mode.

Parameters
ModeWhich value(s) to get
ParamWhere to store the value(s), can be NULL. If not NULL, it must point to an array of ILints that is large enough to contain all values.
Returns
Number of float values.
See Also
ilGetFloat
Since
1.10.0
ILint ILAPIENTRY ilGetInteger ( ILenum  Mode)

Returns the current value of the Mode.

Valid Modes are:

Mode R/W Default Description
IL_CUR_IMAGE R 0 The name of the currently bound image set by ilBindImage().
IL_FORMAT_MODE RW IL_BGRA The format to convert loaded images into if IL_FORMAT_SET is enabled.
IL_KEEP_DXTC_DATA RW IL_FALSE When loading DXTC compressed images, keep a copy of the original data around.
IL_ORIGIN_MODE RW IL_ORIGIN_LOWER_LEFT Specify the origin of the image, can be IL_ORIGIN_LOWER_LEFT or IL_ORIGIN_UPPER_LEFT.
IL_MAX_QUANT_INDICES RW 256 Maximum number of colour indices to use when quantizing images.
IL_NEU_QUANT_SAMPLE RW 15 Number of samples to use when quantizing with NeuQuant.
IL_QUANTIZATION_MODE RW IL_WU_QUANT Quantizer to use, can be IL_WU_QUANT or IL_NEU_QUANT.
IL_TYPE_MODE RW IL_UNSIGNED_BYTE The type to convert loaded images into if IL_TYPE_SET is enabled.
IL_VERSION_NUM R IL_VERSION The version of the image library.
IL_ACTIVE_IMAGE R 0 The currently active sub image, set by ilActiveImage().
IL_ACTIVE_MIPMAP R 0 The currently active mipmap, set by ilActiveMipmap().
IL_ACTIVE_LAYER R 0 The currently active layer, set by ilActiveLayer().
IL_BMP_RLE RW IL_FALSE Use RLE when writing BMPs.
IL_DXTC_FORMAT RW IL_DXT1 DXTC format to use when compressing, can be IL_DXT1, IL_DXT3, IL_DXT4, IL_DXT5, IL_DXT_NO_COMP.
IL_JPG_QUALITY RW 99 JPEG compression quality used when writing JPEG files.
IL_PCD_PICNUM RW 2 Select picture resolution for Kodak Photo CD files.
IL_PNG_ALPHA_INDEX RW -1 Define a colour index as transparent, saved in the tRNS chunk.
IL_PNG_INTERLACE RW IL_FALSE Use interlacing when writing PNG files.
IL_SGI_RLE RW IL_FALSE Use RLE when writing SGI files.
IL_TGA_RLE RW IL_FALSE Use RLE when writing Targa files.
IL_VTF_COMP RW IL_DXT_NO_COMP Compression to use when writing VTF files, can be IL_DXT_NO_COMP, IL_DXT1, IL_DXT3, IL_DXT4, IL_DXT5.
See Also
ilGetIntegerImage for image specific modes.
ILuint ILAPIENTRY ilGetIntegerv ( ILenum  Mode,
ILint *  Param 
)

Gets the current value(s) of the Mode.

Parameters
ModeWhich value(s) to get
ParamWhere to store the value(s), can be NULL. If not NULL, it must point to an array of ILints that is large enough to contain all values.
Returns
Number of integer values.
See Also
ilGetInteger
Since
1.10.0
ILconst_string ILAPIENTRY ilGetString ( ILenum  StringName)

Returns a constant string detailing aspects about this library.

Valid StringNames are:

Name R/W Description
IL_VENDOR R The name of the vendor of this version of the IL implementation.
IL_VERSION_NUM R Current version string of the IL implementation.
IL_LOAD_EXT R A string containing extensions of all files that can be loaded.
IL_SAVE_EXT R A string containing extensions of all files that can be saved.
IL_TGA_ID_STRING RW Identifier string to be used when writing Targa image files. (obsolete: use IL_META_DOCUMENT_NAME)
IL_TGA_AUTHNAME_STRING RW Author name to be used when writing Targa image files. (obsolete: use IL_META_ARTIST)
IL_TGA_AUTHCOMMENT_STRING RW Author comment to be used when writing Targa image files. (obsolete: use IL_META_USER_COMMENT)
IL_PNG_AUTHNAME_STRING RW Author name to be used when writing PNG image files. (obsolete: use IL_META_ARTIST)
IL_PNG_TITLE_STRING RW Image title to be used when writing PNG image files. (obsolete: use IL_META_DOCUMENT_NAME)
IL_PNG_DESCRIPTION_STRING RW Image description to be used when writing PNG image files. (obsolete: use IL_META_IMAGE_DESCRIPTION)
IL_TIF_DESCRIPTION_STRING RW Image description to be used when writing TIFF image files. (obsolete: use IL_META_IMAGE_DESCRIPTION)
IL_TIF_HOSTCOMPUTER_STRING RW Name of host computer to be used when writing TIFF image files. (obsolete: use IL_META_HOST_COMPUTER)
IL_TIF_DOCUMENTNAME_STRING RW Document name to be used when writing TIFF image files. (obsolete: use IL_META_DOCUMENT_NAME)
IL_TIF_AUTHNAME_STRING RW Author name to be used when writing TIFF image files. (obsolete: use IL_META_ARTIST)
IL_CHEAD_HEADER_STRING RW Variable name to use when writing C headers.
IL_META_ARTIST RW Author name meta data to be used when writing images.
IL_META_DOCUMENT_NAME RW Document name meta data to be used when writing images.
IL_META_HOST_COMPUTER RW Host computer name meta data to be used when writing images.
IL_META_USER_COMMENT RW User comment about the image.
IL_META_IMAGE_DESCRIPTION RW String describing the image contents.

Strings marked with RW can also be set using ilSetString();

Parameters
StringNameString to get.
Note
If it belongs to the current image the returned string is valid only as long as the image exists!
void ILAPIENTRY ilHint ( ILenum  Target,
ILenum  Mode 
)

Specifies implementation-dependent performance hints.

These are only recommendations for the image library and it is free to ignore them.

Valid Targets are:

Target Default Description
IL_MEM_SPEED_HINT IL_FASTEST Preference between speed and memory usage. Can be IL_LESS_MEM or IL_FASTEST.
IL_USE_COMPRESSION IL_NO_COMPRESSION Whether to use compression when writing formats that support it optionally. Can be IL_USE_COMPRESSION or IL_NO_COMPRESSION.
ILboolean ILAPIENTRY ilIsDisabled ( ILenum  Mode)

Checks whether a Mode is not enabled.

See Also
ilEnable
ilDisable
ILboolean ILAPIENTRY ilIsEnabled ( ILenum  Mode)

Checks whether a Mode is enabled.

See Also
ilEnable
ilDisable
ILboolean ILAPIENTRY ilOriginFunc ( ILenum  Mode)

Sets the default origin to be used.

Parameters
ModeThe default origin to use. Valid values are:
  • IL_ORIGIN_LOWER_LEFT
  • IL_ORIGIN_UPPER_LEFT
void ILAPIENTRY ilPushAttrib ( ILuint  Bits)

Pushes the states indicated by Bits onto the state stack.

States not indicated by Bits will be set to their default values. Bits can be a combination of:

  • IL_ORIGIN_BIT
  • IL_FORMAT_BIT
  • IL_TYPE_BIT
  • IL_FILE_BIT
  • IL_PAL_BIT
  • IL_FORMAT_SPECIFIC_BIT
Todo:
Create a version of ilPushAttrib() and ilPopAttrib() that behaves more like OpenGL
void ILAPIENTRY ilSetFloat ( ILenum  Mode,
ILfloat  Param 
)

Sets a parameter value for a Mode.

See Also
ilGetFloat for a list of valid Modes.
Since
1.10.0
void ILAPIENTRY ilSetFloatv ( ILenum  Mode,
ILfloat *  Param 
)

Sets a parameter value for a Mode.

See Also
ilGetFloat for a list of valid Modes.
Since
1.10.0
void ILAPIENTRY ilSetInteger ( ILenum  Mode,
ILint  Param 
)

Sets a parameter value for a Mode.

See Also
ilGetInteger for a list of valid Modes.
void ILAPIENTRY ilSetIntegerv ( ILenum  Mode,
ILint *  Param 
)

Sets a parameter value for a Mode.

See Also
ilGetInteger for a list of valid Modes.
Since
1.10.0
void ILAPIENTRY ilSetString ( ILenum  StringName,
ILconst_string  String 
)

Sets a string detailing aspects about this library.

Parameters
StringNameName of string to set.
StringNew string value, will be automatically converted to ILchar if necessary.