- Main Page
- Classes
- Files

- File List
- File Members

# flTextureBMP.h File Reference

`#include "flGlobal.h"`
`#include "flTexture.h"`

Go to the source code of this file.

## Functions
Texture * | texLoadBMP (char *inPath)
| Loads a bitmap image into a Texture struct.
bool | texSaveBMP (Texture *inTex, char *inPath)
| Saves a bitmap image from a Texture struct.

## Function Documentation

Texture* texLoadBMP | ( | char * | inPath | ) |

Loads a bitmap image into a Texture struct.

Parameters:

  | inPath | Path to the bitmap image in memory or file.

Returns:
  A pointer to the texture struct created to hold the bmp, or NULL on failure.

Definition at line 206 of file flTextureBMP.c.

References BMP_HEADER_WV1, bmpInfoHeaderGeneric::bmpAlphaMask, bmpInfoHeaderGeneric::bmpBlueMask, bmpInfoHeaderGeneric::bmpBPP, bmpInfoHeaderGeneric::bmpByteWidth, bmpInfoHeaderGeneric::bmpColorEncoding, bmpInfoHeaderGeneric::bmpColorsImportant, bmpInfoHeaderGeneric::bmpColorsUsed, bmpInfoHeaderGeneric::bmpCompression, bmpInfoHeaderGeneric::bmpCSType, bmpHeader::bmpDataOffset, bmpInfoHeaderGeneric::bmpEndpoints, bmpHeader::bmpFileSize, bmpInfoHeaderGeneric::bmpGammaBlue, bmpInfoHeaderGeneric::bmpGammaGreen, bmpInfoHeaderGeneric::bmpGammaRed, bmpInfoHeaderGeneric::bmpGreenMask, bmpInfoHeaderGeneric::bmpHeight, bmpInfoHeaderGeneric::bmpIdentifier, bmpInfoHeaderGeneric::bmpImageSize, bmpInfoHeaderGeneric::bmpIntent, bmpInfoHeaderGeneric::bmpPlanes, bmpInfoHeaderGeneric::bmpProfileData, bmpInfoHeaderGeneric::bmpProfileSize, bmpInfoHeaderGeneric::bmpRecording, bmpInfoHeaderGeneric::bmpRedMask, bmpInfoHeaderGeneric::bmpRendering, bmpInfoHeaderGeneric::bmpReserved, bmpHeader::bmpReserved, bmpHeader::bmpSignature, bmpInfoHeaderGeneric::bmpSize, bmpInfoHeaderGeneric::bmpSize1, bmpInfoHeaderGeneric::bmpSize2, bmpInfoHeaderGeneric::bmpType, bmpInfoHeaderGeneric::bmpUnits, bmpInfoHeaderGeneric::bmpWidth, bmpInfoHeaderGeneric::bmpXResolution, bmpInfoHeaderGeneric::bmpYResolution, debugError, debugWarning, FILE_MODE_BINARY, FILE_MODE_READ, fileClose(), fileOpen(), fileRead(), and NULL.

Referenced by texLoad().

bool texSaveBMP | ( | Texture * | inTex,
|  | char * | inPath |
| ) |  |  |

Saves a bitmap image from a Texture struct.

Parameters:

  | inTex | The texture to save as a bmp.
  | inPath | Path to the file to which the bitmap image will be written.

Returns:
  Whether the bitmap was saved successfully or not.

Warning:
  This will always return false an log an error as it is not yet implemented.

Definition at line 859 of file flTextureBMP.c.

References debugWarning.

Referenced by texSave().