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

`#include "il_internal.h"`
`#include "il_bmp.h"`
`#include "il_manip.h"`
`#include "il_endian.h"`
`#include <stdio.h>`

## Defines

#define | IL_BMP_C

## Functions

void | GetShiftFromMask (const ILuint Mask, ILuint *CONST_RESTRICT ShiftLeft, ILuint *CONST_RESTRICT ShiftRight)
ILboolean | ilIsValidBmp (ILconst_string CONST_RESTRICT FileName)
| Checks if the file specified in FileName is a valid .bmp file.
ILboolean | ilIsValidBmpF (ILHANDLE File)
| Checks if the ILHANDLE contains a valid .bmp file at the current position.
ILboolean | ilIsValidBmpL (const void *Lump, const ILuint Size)
| Checks if Lump is a valid .bmp lump.
ILboolean | iGetBmpHead (BMPHEAD *const Header)
ILboolean | iGetOS2Head (OS2_HEAD *const Header)
ILboolean | iIsValidBmp ()
ILboolean | iCheckBmp (const BMPHEAD *CONST_RESTRICT Header)
ILboolean | iCheckOS2 (const OS2_HEAD *CONST_RESTRICT Header)
ILboolean | ilLoadBmp (ILconst_string FileName)
| Reads a .bmp file.
ILboolean | ilLoadBmpF (ILHANDLE File)
| Reads an already-opened .bmp file.
ILboolean | ilLoadBmpL (const void *Lump, const ILuint Size)
| Reads from a memory "lump" that contains a .bmp.
ILboolean | iLoadBitmapInternal ()
ILboolean | ilReadUncompBmp (BMPHEAD *Header)
ILboolean | ilReadRLE8Bmp (BMPHEAD *Header)
ILboolean | ilReadRLE4Bmp (BMPHEAD *Header)
ILboolean | iGetOS2Bmp (OS2_HEAD *Header)
ILboolean | ilSaveBmp (const ILstring FileName)
| Writes a Bmp file.
ILuint | ilSaveBmpF (ILHANDLE File)
| Writes a Bmp to an already-opened file.
ILuint | ilSaveBmpL (void *Lump, ILuint Size)
| Writes a Bmp to a memory "lump".
ILboolean | iSaveBitmapInternal ()

## Define Documentation

#define IL_BMP_C

## Function Documentation

void GetShiftFromMask | ( | const ILuint | Mask,
|  | ILuint *CONST_RESTRICT | ShiftLeft,
|  | ILuint *CONST_RESTRICT | ShiftRight |
| ) |  |  |

Referenced by ilReadUncompBmp().

ILboolean iCheckBmp | ( | const BMPHEAD *CONST_RESTRICT | Header | ) |

Referenced by iIsValidBmp(), and iLoadBitmapInternal().

ILboolean iCheckOS2 | ( | const OS2_HEAD *CONST_RESTRICT | Header | ) |

Referenced by iIsValidBmp(), and iLoadBitmapInternal().

ILboolean iGetBmpHead | ( | BMPHEAD *const | Header | ) |

Referenced by iIsValidBmp(), and iLoadBitmapInternal().

ILboolean iGetOS2Bmp | ( | OS2_HEAD * | Header | ) |

Referenced by iLoadBitmapInternal().

ILboolean iGetOS2Head | ( | OS2_HEAD *const | Header | ) |

Referenced by iIsValidBmp(), and iLoadBitmapInternal().

ILboolean iIsValidBmp | ( |  | ) |

Referenced by ilIsValidBmpF(), and ilIsValidBmpL().

ILboolean ilIsValidBmp | ( | ILconst_string CONST_RESTRICT | FileName | ) |

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

Referenced by ilIsValid().

ILboolean ilIsValidBmpF | ( | ILHANDLE | File | ) |

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

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

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

Checks if Lump is a valid .bmp lump.

Referenced by ilDetermineTypeL(), and ilIsValidL().

ILboolean ilLoadBmp | ( | ILconst_string | FileName | ) |

Reads a .bmp file.

Referenced by ilLoad(), and ilLoadImage().

ILboolean ilLoadBmpF | ( | ILHANDLE | File | ) |

Reads an already-opened .bmp file.

Referenced by ilLoadBmp(), and ilLoadF().

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

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

Referenced by ilLoadL().

ILboolean iLoadBitmapInternal | ( |  | ) |

Referenced by ilLoadBmpF(), and ilLoadBmpL().

ILboolean ilReadRLE4Bmp | ( | BMPHEAD * | Header | ) |

Referenced by iLoadBitmapInternal().

ILboolean ilReadRLE8Bmp | ( | BMPHEAD * | Header | ) |

Referenced by iLoadBitmapInternal().

ILboolean ilReadUncompBmp | ( | BMPHEAD * | Header | ) |

Referenced by iLoadBitmapInternal().

ILboolean ilSaveBmp | ( | const ILstring | FileName | ) |

Writes a Bmp file.

Referenced by ilSave(), and ilSaveImage().

ILuint ilSaveBmpF | ( | ILHANDLE | File | ) |

Writes a Bmp to an already-opened file.

Referenced by ilSaveBmp(), and ilSaveF().

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

Writes a Bmp to a memory "lump".

Referenced by ilDetermineSize(), and ilSaveL().

ILboolean iSaveBitmapInternal | ( |  | ) |

Referenced by ilSaveBmpF(), and ilSaveBmpL().