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

`#include "il_internal.h"`
`#include "il_pal.h"`
`#include <string.h>`
`#include <ctype.h>`
`#include <limits.h>`

## Data Structures

struct | COL_CUBE

## Functions

ILboolean ILAPIENTRY | ilLoadPal (ILconst_string FileName)
| Loads a palette from FileName into the current image's palette.
ILboolean | ilLoadJascPal (ILconst_string FileName)
| Loads a Paint Shop Pro formatted palette (.pal) file.
char * | iFgetw (ILubyte *Buff, ILint MaxLen, FILE *File)
ILboolean ILAPIENTRY | ilSavePal (ILconst_string FileName)
ILboolean | ilSaveJascPal (ILconst_string FileName)
| Saves a Paint Shop Pro formatted palette (.pal) file.
ILboolean | ilLoadHaloPal (ILconst_string FileName)
| Loads a Halo formatted palette (.pal) file.
ILboolean | ilLoadColPal (ILconst_string FileName)
| Loads a .col palette file.
ILboolean | ilLoadActPal (ILconst_string FileName)
| Loads an .act palette file.
ILboolean | ilLoadPltPal (ILconst_string FileName)
| Loads an .plt palette file.
ILAPI ILpal *ILAPIENTRY | iCopyPal ()
ILAPI ILpal *ILAPIENTRY | iConvertPal (ILpal *Pal, ILenum DestFormat)
ILboolean ILAPIENTRY | ilConvertPal (ILenum DestFormat)
| Converts the current image to the DestFormat format.
ILAPI void ILAPIENTRY | ilSetPal (ILpal *Pal)
int | sort_func (void *e1, void *e2)
ILboolean ILAPIENTRY | ilApplyPal (ILconst_string FileName)

## Variables

ILuint | CurSort = 0

## Function Documentation

ILAPI ILpal* ILAPIENTRY iConvertPal | ( | ILpal * | Pal,
|  | ILenum | DestFormat |
| ) |  |  |

Referenced by ilConvertPal(), iSaveBitmapInternal(), iSavePcxInternal(), iSavePngInternal(), iSavePsdInternal(), and iSaveTargaInternal().

ILAPI ILpal* ILAPIENTRY iCopyPal | ( | void |  | ) |

char* iFgetw | ( | ILubyte * | Buff,
|  | ILint | MaxLen,
|  | FILE * | File |
| ) |  |  |

Referenced by ilLoadJascPal().

ILboolean ILAPIENTRY ilApplyPal | ( | ILconst_string | FileName | ) |

ILboolean ILAPIENTRY ilConvertPal | ( | ILenum | DestFormat | ) |

Converts the current image to the DestFormat format.

Referenced by iConvertPalette(), ilAddAlphaKey(), ilApplyPal(), ilSaveJascPal(), iluScale(), and iluSwapColours().

ILboolean ilLoadActPal | ( | ILconst_string | FileName | ) |

Loads an .act palette file.

Referenced by ilLoadPal().

ILboolean ilLoadColPal | ( | ILconst_string | FileName | ) |

Loads a .col palette file.

Referenced by ilLoadPal().

ILboolean ilLoadHaloPal | ( | ILconst_string | FileName | ) |

Loads a Halo formatted palette (.pal) file.

Referenced by ilLoadPal().

ILboolean ilLoadJascPal | ( | ILconst_string | FileName | ) |

Loads a Paint Shop Pro formatted palette (.pal) file.

Referenced by ilLoadPal().

ILboolean ILAPIENTRY ilLoadPal | ( | ILconst_string | FileName | ) |

Loads a palette from FileName into the current image's palette.

Referenced by ilApplyPal().

ILboolean ilLoadPltPal | ( | ILconst_string | FileName | ) |

Loads an .plt palette file.

Referenced by ilLoadPal().

ILboolean ilSaveJascPal | ( | ILconst_string | FileName | ) |

Saves a Paint Shop Pro formatted palette (.pal) file.

Referenced by ilSave(), and ilSavePal().

ILboolean ILAPIENTRY ilSavePal | ( | ILconst_string | FileName | ) |

Referenced by ilSaveImage().

ILAPI void ILAPIENTRY ilSetPal | ( | ILpal * | Pal | ) |

Referenced by iluRotate3D().

int sort_func | ( | void * | e1,
|  | void * | e2 |
| ) |  |  |

## Variable Documentation

ILuint CurSort = 0