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

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

## Functions

ILboolean | ilIsValidSgi (ILconst_string FileName)
ILboolean | ilIsValidSgiF (ILHANDLE File)
ILboolean | ilIsValidSgiL (const void *Lump, ILuint Size)
| Checks if Lump is a valid .sgi lump.
ILboolean | iGetSgiHead (iSgiHeader *Header)
ILboolean | iIsValidSgi ()
ILboolean | iCheckSgi (iSgiHeader *Header)
ILboolean | ilLoadSgi (ILconst_string FileName)
ILboolean | ilLoadSgiF (ILHANDLE File)
ILboolean | ilLoadSgiL (const void *Lump, ILuint Size)
ILboolean | iLoadSgiInternal ()
ILboolean | iReadRleSgi (iSgiHeader *Head)
ILint | iGetScanLine (ILubyte *ScanLine, iSgiHeader *Head, ILuint Length)
ILboolean | iReadNonRleSgi (iSgiHeader *Head)
void | sgiSwitchData (ILubyte *Data, ILuint SizeOfData)
ILboolean | iNewSgi (iSgiHeader *Head)
ILboolean | ilSaveSgi (const ILstring FileName)
| Writes a SGI file.
ILuint | ilSaveSgiF (ILHANDLE File)
| Writes a Sgi to an already-opened file.
ILuint | ilSaveSgiL (void *Lump, ILuint Size)
| Writes a Sgi to a memory "lump".
ILenum | DetermineSgiType (ILenum Type)
ILboolean | iSaveSgiInternal ()
ILboolean | iSaveRleSgi (ILubyte *Data, ILuint w, ILuint h, ILuint numChannels, ILuint bps)

## Function Documentation

ILenum DetermineSgiType | ( | ILenum | Type | ) |

Referenced by iSaveSgiInternal().

ILboolean iCheckSgi | ( | iSgiHeader * | Header | ) |

Referenced by iIsValidSgi(), and iLoadSgiInternal().

ILint iGetScanLine | ( | ILubyte * | ScanLine,
|  | iSgiHeader * | Head,
|  | ILuint | Length |
| ) |  |  |

Referenced by iReadRleSgi().

ILboolean iGetSgiHead | ( | iSgiHeader * | Header | ) |

Referenced by iIsValidSgi(), and iLoadSgiInternal().

ILboolean iIsValidSgi | ( | void |  | ) |

Referenced by ilIsValidSgiF(), and ilIsValidSgiL().

ILboolean ilIsValidSgi | ( | ILconst_string | FileName | ) |

Checks if the file specified in FileName is a valid .sgi file.

Referenced by ilIsValid().

ILboolean ilIsValidSgiF | ( | ILHANDLE | File | ) |

Checks if the ILHANDLE contains a valid .sgi file at the current position.

Referenced by ilDetermineTypeF(), ilIsValidF(), and ilIsValidSgi().

ILboolean ilIsValidSgiL | ( | const void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Checks if Lump is a valid .sgi lump.

Referenced by ilDetermineTypeL(), and ilIsValidL().

ILboolean ilLoadSgi | ( | ILconst_string | FileName | ) |

Reads a SGI file

Referenced by ilLoad(), and ilLoadImage().

ILboolean ilLoadSgiF | ( | ILHANDLE | File | ) |

Reads an already-opened SGI file

Referenced by ilLoadF(), and ilLoadSgi().

ILboolean ilLoadSgiL | ( | const void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Reads from a memory "lump" that contains a SGI image

Referenced by ilLoadL().

ILboolean iLoadSgiInternal | ( | void |  | ) |

Referenced by ilLoadSgiF(), and ilLoadSgiL().

ILboolean ilSaveSgi | ( | const ILstring | FileName | ) |

Writes a SGI file.

Referenced by ilSave(), and ilSaveImage().

ILuint ilSaveSgiF | ( | ILHANDLE | File | ) |

Writes a Sgi to an already-opened file.

Referenced by ilSaveF(), and ilSaveSgi().

ILuint ilSaveSgiL | ( | void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Writes a Sgi to a memory "lump".

Referenced by ilDetermineSize(), and ilSaveL().

ILboolean iNewSgi | ( | iSgiHeader * | Head | ) |

Referenced by iReadNonRleSgi(), and iReadRleSgi().

ILboolean iReadNonRleSgi | ( | iSgiHeader * | Head | ) |

Referenced by iLoadSgiInternal().

ILboolean iReadRleSgi | ( | iSgiHeader * | Head | ) |

Referenced by iLoadSgiInternal().

ILboolean iSaveRleSgi | ( | ILubyte * | Data,
|  | ILuint | w,
|  | ILuint | h,
|  | ILuint | numChannels,
|  | ILuint | bps |
| ) |  |  |

Referenced by iSaveSgiInternal().

ILboolean iSaveSgiInternal | ( | void |  | ) |

Referenced by ilSaveSgiF(), and ilSaveSgiL().

void sgiSwitchData | ( | ILubyte * | Data,
|  | ILuint | SizeOfData |
| ) |  |  |

Referenced by iReadRleSgi().