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

`#include "il_internal.h"`
`#include "il_hdr.h"`
`#include "il_endian.h"`

## Data Structures

struct | rgbe_header_info

## Defines

#define | RGBE_VALID_PROGRAMTYPE 0x01
#define | RGBE_VALID_GAMMA 0x02
#define | RGBE_VALID_EXPOSURE 0x04
#define | RGBE_DATA_RED 0
#define | RGBE_DATA_GREEN 1
#define | RGBE_DATA_BLUE 2
#define | RGBE_DATA_SIZE 3
#define | MINRUNLENGTH 4

## Functions

ILboolean | ilIsValidHdr (ILconst_string FileName)
| Checks if the file specified in FileName is a valid .hdr file.
ILboolean | ilIsValidHdrF (ILHANDLE File)
| Checks if the ILHANDLE contains a valid .hdr file at the current position.
ILboolean | ilIsValidHdrL (const void *Lump, ILuint Size)
| Checks if Lump is a valid .hdr lump.
ILboolean | iGetHdrHead (HDRHEADER *Header)
ILboolean | iIsValidHdr ()
ILboolean | iCheckHdr (HDRHEADER *Header)
ILboolean | ilLoadHdr (ILconst_string FileName)
| Reads a .hdr file.
ILboolean | ilLoadHdrF (ILHANDLE File)
| Reads an already-opened .hdr file.
ILboolean | ilLoadHdrL (const void *Lump, ILuint Size)
| Reads from a memory "lump" that contains a .hdr.
ILboolean | iLoadHdrInternal ()
void | ReadScanline (ILubyte *scanline, ILuint w)
ILboolean | ilSaveHdr (const ILstring FileName)
| Writes a Hdr file.
ILuint | ilSaveHdrF (ILHANDLE File)
| Writes a Hdr to an already-opened file.
ILuint | ilSaveHdrL (void *Lump, ILuint Size)
| Writes a Hdr to a memory "lump".
ILboolean | RGBE_WriteHeader (ILuint width, ILuint height, rgbe_header_info *info)
int | RGBE_WritePixels (float *data, int numpixels)
ILboolean | RGBE_WriteBytes_RLE (ILubyte *data, ILuint numbytes)
ILboolean | iSaveHdrInternal ()

## Define Documentation

#define MINRUNLENGTH 4

Referenced by RGBE_WriteBytes_RLE().

#define RGBE_DATA_BLUE 2

Referenced by iSaveHdrInternal(), and RGBE_WritePixels().

#define RGBE_DATA_GREEN 1

Referenced by iSaveHdrInternal(), and RGBE_WritePixels().

#define RGBE_DATA_RED 0

Referenced by iSaveHdrInternal(), and RGBE_WritePixels().

#define RGBE_DATA_SIZE 3

Referenced by iSaveHdrInternal(), and RGBE_WritePixels().

#define RGBE_VALID_EXPOSURE 0x04

Referenced by RGBE_WriteHeader().

#define RGBE_VALID_GAMMA 0x02

Referenced by RGBE_WriteHeader().

#define RGBE_VALID_PROGRAMTYPE 0x01

Referenced by RGBE_WriteHeader().

## Function Documentation

ILboolean iCheckHdr | ( | HDRHEADER * | Header | ) |

Referenced by iLoadHdrInternal().

ILboolean iGetHdrHead | ( | HDRHEADER * | Header | ) |

Referenced by iLoadHdrInternal().

ILboolean iIsValidHdr | ( |  | ) |

Referenced by ilIsValidHdrF(), and ilIsValidHdrL().

ILboolean ilIsValidHdr | ( | ILconst_string | FileName | ) |

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

Referenced by ilIsValid().

ILboolean ilIsValidHdrF | ( | ILHANDLE | File | ) |

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

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

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

Checks if Lump is a valid .hdr lump.

Referenced by ilDetermineTypeL(), and ilIsValidL().

ILboolean ilLoadHdr | ( | ILconst_string | FileName | ) |

Reads a .hdr file.

Referenced by ilLoad(), and ilLoadImage().

ILboolean ilLoadHdrF | ( | ILHANDLE | File | ) |

Reads an already-opened .hdr file.

Referenced by ilLoadF(), and ilLoadHdr().

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

Reads from a memory "lump" that contains a .hdr.

Referenced by ilLoadL().

ILboolean iLoadHdrInternal | ( |  | ) |

Referenced by ilLoadHdrF(), and ilLoadHdrL().

ILboolean ilSaveHdr | ( | const ILstring | FileName | ) |

Writes a Hdr file.

Referenced by ilSave(), and ilSaveImage().

ILuint ilSaveHdrF | ( | ILHANDLE | File | ) |

Writes a Hdr to an already-opened file.

Referenced by ilSaveF(), and ilSaveHdr().

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

Writes a Hdr to a memory "lump".

Referenced by ilDetermineSize(), and ilSaveL().

ILboolean iSaveHdrInternal | ( |  | ) |

Referenced by ilSaveHdrF(), and ilSaveHdrL().

void ReadScanline | ( | ILubyte * | scanline,
|  | ILuint | w |
| ) |  |  |

Referenced by iLoadHdrInternal().

ILboolean RGBE_WriteBytes_RLE | ( | ILubyte * | data,
|  | ILuint | numbytes |
| ) |  |  |

Referenced by iSaveHdrInternal().

ILboolean RGBE_WriteHeader | ( | ILuint | width,
|  | ILuint | height,
|  | rgbe_header_info * | info |
| ) |  |  |

Referenced by iSaveHdrInternal().

int RGBE_WritePixels | ( | float * | data,
|  | int | numpixels |
| ) |  |  |

Referenced by iSaveHdrInternal().