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

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

## Functions

ILAPI ILboolean ILAPIENTRY | ilInitImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data)
ILAPI ILimage *ILAPIENTRY | ilNewImage (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc)
ILAPI ILimage *ILAPIENTRY | ilNewImageFull (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data)
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).
ILAPI ILboolean ILAPIENTRY | ilTexImage_ (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data)
ILboolean ILAPIENTRY | ilSetData (void *Data)
| Uploads Data of the same size to replace the current image's data.
ILAPI ILboolean ILAPIENTRY | ilTexSubImage_ (ILimage *Image, void *Data)
ILubyte *ILAPIENTRY | ilGetData ()
ILubyte *ILAPIENTRY | ilGetPalette ()
void ILAPIENTRY | ilClearColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
ILAPI void ILAPIENTRY | ilGetClear (void *Colours, ILenum Format, ILenum Type)
ILboolean ILAPIENTRY | ilClearImage ()
| Clears the current bound image to the values specified in ilClearColour.
ILAPI ILboolean ILAPIENTRY | ilClearImage_ (ILimage *Image)
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 | ilBlit (ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth)
ILboolean | iCopySubImage (ILimage *Dest, ILimage *Src)
ILboolean | iCopySubImages (ILimage *Dest, ILimage *Src)
ILAPI ILboolean ILAPIENTRY | ilCopyImageAttr (ILimage *Dest, ILimage *Src)
ILboolean ILAPIENTRY | ilCopyImage (ILuint Src)
| Copies everything from Src to the current bound image.
ILAPI ILimage *ILAPIENTRY | ilCopyImage_ (ILimage *Src)
ILuint ILAPIENTRY | ilCloneCurImage ()
ILAPI ILboolean ILAPIENTRY | ilResizeImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc)

## Function Documentation

ILboolean iCopySubImage | ( | ILimage * | Dest,
|  | ILimage * | Src |
| ) |  |  |

Referenced by iCopySubImages().

ILboolean iCopySubImages | ( | ILimage * | Dest,
|  | ILimage * | Src |
| ) |  |  |

ILboolean ILAPIENTRY ilBlit | ( | ILuint | Source,
|  | ILint | DestX,
|  | ILint | DestY,
|  | ILint | DestZ,
|  | ILuint | SrcX,
|  | ILuint | SrcY,
|  | ILuint | SrcZ,
|  | ILuint | Width,
|  | ILuint | Height,
|  | ILuint | Depth |
| ) |  |  |

Referenced by ilOverlayImage().

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

Referenced by ilImage::ClearColour().

ILboolean ILAPIENTRY ilClearImage | ( | void |  | ) |

Clears the current bound image to the values specified in ilClearColour.

Referenced by ilImage::Clear(), and iluEnlargeCanvas().

ILAPI ILboolean ILAPIENTRY ilClearImage_ | ( | ILimage * | Image | ) |

Referenced by ilClearImage(), and iluRotate_().

ILuint ILAPIENTRY ilCloneCurImage | ( | void |  | ) |

ILboolean ILAPIENTRY ilCopyImage | ( | ILuint | Src | ) |

Copies everything from Src to the current bound image.

Referenced by ilImage::Copy(), and ilImage::operator=().

ILAPI ILimage* ILAPIENTRY ilCopyImage_ | ( | ILimage * | Src | ) |

Referenced by iluBuild2DMipmaps(), and iluBuild3DMipmaps().

ILAPI ILboolean ILAPIENTRY ilCopyImageAttr | ( | ILimage * | Dest,
|  | ILimage * | Src |
| ) |  |  |

Referenced by iConvertImage(), iConvertPalette(), iCopySubImage(), ilCloneCurImage(), ilCopyImage(), ilCopyImage_(), iluRotate_(), iluScale_(), iluSharpen(), iNeuQuant(), and iQuantizeImage().

ILAPI void ILAPIENTRY ilGetClear | ( | void * | Colours,
|  | ILenum | Format,
|  | ILenum | Type |
| ) |  |  |

Referenced by ilClearImage_(), and iluReplaceColour().

ILubyte* ILAPIENTRY ilGetData | ( | void |  | ) |

Referenced by ilImage::GetData(), and iluGetImageInfo().

ILubyte* ILAPIENTRY ilGetPalette | ( | void |  | ) |

Referenced by ilImage::GetPalette().

ILAPI ILboolean ILAPIENTRY ilInitImage | ( | ILimage * | Image,
|  | ILuint | Width,
|  | ILuint | Height,
|  | ILuint | Depth,
|  | ILubyte | Bpp,
|  | ILenum | Format,
|  | ILenum | Type,
|  | void * | Data |
| ) |  |  |

Referenced by ilNewImage(), ilNewImageFull(), iLoadJp2Internal(), and ilTexImage_().

ILAPI ILimage* ILAPIENTRY ilNewImage | ( | ILuint | Width,
|  | ILuint | Height,
|  | ILuint | Depth,
|  | ILubyte | Bpp,
|  | ILubyte | Bpc |
| ) |  |  |

Referenced by GetImages(), iBindImageTemp(), iBuild1DMipmaps_(), iBuild1DMipmapsVertical_(), iBuild2DMipmaps_(), iBuild3DMipmaps_(), iBuild3DMipmapsHorizontal_(), iBuild3DMipmapsVertical_(), iIcnsReadData(), ilBindImage(), ilCopyImage_(), ilCreateSubImage(), ilGenImages(), iLoadDdsCubemapInternal(), iLoadIconInternal(), ilRegisterMipNum(), ilRegisterNumFaces(), ilRegisterNumImages(), iluContrast(), iluScaleAdvanced(), iluSharpen(), iSetImage0(), iUncompressDcx(), iUncompressDcxSmall(), and ReadMipmaps().

ILAPI ILimage* ILAPIENTRY ilNewImageFull | ( | ILuint | Width,
|  | ILuint | Height,
|  | ILuint | Depth,
|  | ILubyte | Bpp,
|  | ILenum | Format,
|  | ILenum | Type,
|  | void * | Data |
| ) |  |  |

Referenced by iLoadTplInternal(), iLoadVtfInternal(), VtfInitFacesMipmaps(), and VtfInitMipmaps().

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.

ILAPI ILboolean ILAPIENTRY ilResizeImage | ( | ILimage * | Image,
|  | ILuint | Width,
|  | ILuint | Height,
|  | ILuint | Depth,
|  | ILubyte | Bpp,
|  | ILubyte | Bpc |
| ) |  |  |

Referenced by iConvertPalette(), iluRotate_(), and iluScale_().

ILboolean ILAPIENTRY ilSetData | ( | void * | Data | ) |

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

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).

Referenced by AllocImage(), AssembleImage(), i16BitTarga(), iGetOS2Bmp(), iIcnsReadData(), ilApplyPal(), ilCloneCurImage(), ilCopyImage(), ilDefaultImage(), ilLoadFromJpegStruct(), iLoadCutInternal(), iLoadDataInternal(), iLoadDcxInternal(), iLoadDoomFlatInternal(), iLoadDoomInternal(), iLoadExrInternal(), iLoadGifInternal(), iLoadHdrInternal(), iLoadIconInternal(), iLoadIffInternal(), iLoadJp2Internal(), iLoadLifInternal(), iLoadMdlInternal(), iLoadPcdInternal(), iLoadPicInternal(), iLoadPixInternal(), iLoadPxrInternal(), iLoadRawInternal(), iLoadSunInternal(), iLoadTplInternal(), iLoadVtfInternal(), iLoadWalInternal(), iLoadWbmpInternal(), iLoadWdpInternal(), iLoadXpmInternal(), ilReadAsciiPpm(), ilReadBinaryPpm(), ilReadBitPbm(), ilReadRLE4Bmp(), ilReadRLE8Bmp(), ilReadUncompBmp(), iluCrop2D(), iluCrop3D(), iluEnlargeCanvas(), iluRotate(), iluRotate3D(), iluScale(), iluScaleAdvanced(), iNewSgi(), iReadBwTga(), iReadColMapTga(), iReadUnmapTga(), iUncompressPcx(), iUncompressSmall(), mymngprocessheader(), ReadCMYK(), ReadGrey(), ReadIndexed(), readpng_get_image(), ReadRGB(), and ilImage::TexImage().

ILAPI ILboolean ILAPIENTRY ilTexImage_ | ( | ILimage * | Image,
|  | ILuint | Width,
|  | ILuint | Height,
|  | ILuint | Depth,
|  | ILubyte | Bpp,
|  | ILenum | Format,
|  | ILenum | Type,
|  | void * | Data |
| ) |  |  |

Referenced by ilTexImage().

ILAPI ILboolean ILAPIENTRY ilTexSubImage_ | ( | ILimage * | Image,
|  | void * | Data |
| ) |  |  |

Referenced by ilSetData().