# E:/DevIL/src-IL/src/il_convert.c File Reference

`#include "il_internal.h"`
`#include "il_manip.h"`
`#include <limits.h>`

## Functions

ILimage * | iConvertPalette (ILimage *Image, ILenum DestFormat)
ILimage * | iQuantizeImage (ILimage *Image, ILuint NumCols)
ILimage * | iNeuQuant (ILimage *Image, ILuint NumCols)
ILAPI ILimage *ILAPIENTRY | iConvertImage (ILimage *Image, ILenum DestFormat, ILenum DestType)
ILboolean ILAPIENTRY | ilConvertImage (ILenum DestFormat, ILenum DestType)
| Converts the current image to the DestFormat format.
ILboolean | ilSwapColours ()
ILboolean | ilAddAlpha ()
void ILAPIENTRY | ilKeyColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
ILboolean | ilAddAlphaKey (ILimage *Image)
ILboolean | ilRemoveAlpha ()
ILboolean | ilFixCur ()
ILboolean | ilFixImage ()

## Function Documentation

ILAPI ILimage* ILAPIENTRY iConvertImage | ( | ILimage * | Image,
|  | ILenum | DestFormat,
|  | ILenum | DestType |
| ) |  |  |

Referenced by Compress(), CompressTo565(), CompressTo88(), CompressToRXGB(), ilConvertImage(), ilGetAlpha(), ilSaveCHeader(), ilSaveFromJpegStruct(), iluEqualize(), iluRotate(), iluScale_(), iNeuQuant(), iQuantizeImage(), iSaveBitmapInternal(), iSaveExrInternal(), iSaveHdrInternal(), iSaveJp2Internal(), iSaveJpegInternal(), iSavePcxInternal(), iSavePngInternal(), iSavePnmInternal(), iSavePsdInternal(), iSaveSgiInternal(), and iSaveTargaInternal().

ILimage* iConvertPalette | ( | ILimage * | Image,
|  | ILenum | DestFormat |
| ) |  |  |

Referenced by iConvertImage().

ILboolean ilAddAlpha | ( | void |  | ) |

ILboolean ilAddAlphaKey | ( | ILimage * | Image | ) |

Referenced by ilConvertImage().

ILboolean ILAPIENTRY ilConvertImage | ( | ILenum | DestFormat,
|  | ILenum | DestType |
| ) |  |  |

Converts the current image to the DestFormat format.

Parameters:

  | DestFormat | An enum of the desired output format.
  | DestType | An enum of the desired output type.

Returns:
  Boolean value of failure or success.

Referenced by ilImage::Convert(), ilAddAlphaKey(), ilFixCur(), ilModAlpha(), iLoadIffInternal(), iLoadMdlInternal(), ilSetAlpha(), iluBlurAvg(), iluBlurGaussian(), iluConvolution(), iluEdgeDetectE(), iluEdgeDetectP(), iluEdgeDetectS(), iluEmboss(), iluPixelize(), iluScale(), and iluSwapColours().

ILboolean ilFixCur | ( | void |  | ) |

Referenced by ilDxtcDataToSurface(), and ilFixImage().

ILboolean ilFixImage | ( | void |  | ) |

Referenced by ilLoadFromJpegStruct(), iLoadBitmapInternal(), iLoadCutInternal(), iLoadDataInternal(), iLoadDcxInternal(), iLoadDdsCubemapInternal(), iLoadDdsInternal(), iLoadDoomFlatInternal(), iLoadDoomInternal(), iLoadExrInternal(), iLoadGifInternal(), iLoadHdrInternal(), iLoadIcnsInternal(), iLoadIconInternal(), iLoadIffInternal(), iLoadJp2Internal(), iLoadLifInternal(), iLoadMdlInternal(), iLoadMngInternal(), iLoadPcdInternal(), iLoadPcxInternal(), iLoadPicInternal(), iLoadPixInternal(), iLoadPngInternal(), iLoadPnmInternal(), iLoadPsdInternal(), iLoadPspInternal(), iLoadRawInternal(), iLoadSgiInternal(), iLoadSunInternal(), iLoadTargaInternal(), iLoadTplInternal(), iLoadVtfInternal(), and iLoadWalInternal().

void ILAPIENTRY ilKeyColour | ( | ILclampf | Red,
|  | ILclampf | Green,
|  | ILclampf | Blue,
|  | ILclampf | Alpha |
| ) |  |  |

ILboolean ilRemoveAlpha | ( | void |  | ) |

ILboolean ilSwapColours | ( | void |  | ) |

Referenced by iSaveTargaInternal().

ILimage* iNeuQuant | ( | ILimage * | Image,
|  | ILuint | NumCols |
| ) |  |  |

Referenced by iConvertImage(), and iSaveWbmpInternal().

ILimage* iQuantizeImage | ( | ILimage * | Image,
|  | ILuint | NumCols |
| ) |  |  |

Referenced by iConvertImage(), and iSaveWbmpInternal().