- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# GhulbusUtil::gbImageLoader::gbImageType Class Reference

Interface for image file loaders. More...

`#include <gbImageLoader.hpp>`

Inherited by GhulbusUtil::gbImageType_BMP_T, and GhulbusUtil::gbImageType_TGA_T.

List of all members.

## Public Member Functions
virtual void | ReadFile (std::ifstream &file, int *width, int *height, int *bpp, unsigned char **pp_data, unsigned int **pp_palette)=0
| Read image data from file.
virtual bool | CheckFile (std::ifstream const &file)=0
| Check if the file is of a specific image type.
virtual | ~gbImageType ()
| Destructor.

## Detailed Description

Interface for image file loaders.

## Member Function Documentation

virtual void GhulbusUtil::gbImageLoader::gbImageType::ReadFile | ( | std::ifstream & | file,
|  | int * | width,
|  | int * | height,
|  | int * | bpp,
|  | unsigned char ** | pp_data,
|  | unsigned int ** | pp_palette |
| ) |  |  | `[pure virtual]`

Read image data from file.

Parameters:

  `[in]` | file | An open filestream to the image file
  `[out]` | width | The image's width in pixels
  `[out]` | height | The image's height in pixels
  `[out]` | bpp | Bits per pixel
  `[in,out]` | pp_data | A field containing the image data; Memory will be allocated by ReadFile() itself!
  `[in,out]` | pp_palette | A field containing palette data; Memory will be allocated by ReadFile() itself!

Exceptions:

  | std::bad_alloc |

virtual bool GhulbusUtil::gbImageLoader::gbImageType::CheckFile | ( | std::ifstream const & | file | ) | `[pure virtual]`

Check if the file is of a specific image type.

Parameters:

  `[in]` | file | An open filestream to the image file

Returns:
  True if the file can be read using the current image type, false otherwise

The documentation for this class was generated from the following files:

- gbLib/include/gbImageLoader.hpp
- gbLib/src/gbImageLoader.cpp