#include <tga_image.h>
Inherits mxgui::basic_image_base< unsigned short >.
List of all members.
Detailed Description
This is a class for handling .tga images stored on disk. It is optimized for memory usage, so that it can used on arbitrary sized images on microcontrollers. To do this it does not load the image on disk and only fseeks around as needed. The obvious drawback is that it is heavy on disk bandwidth, but there's no other way to do that when you don't have enough RAM
Constructor & Destructor Documentation
mxgui::TgaImage::TgaImage |
( |
|
) |
[inline] |
mxgui::TgaImage::TgaImage |
( |
const char * |
filename |
) |
[inline, explicit] |
Construct from a filename
- Parameters:
-
| filename | file name of tga image |
mxgui::TgaImage::TgaImage |
( |
const TgaImage & |
rhs |
) |
[inline] |
Copy constructor
- Parameters:
-
| rhs | instance to copy from |
virtual mxgui::TgaImage::~TgaImage |
( |
|
) |
[inline, virtual] |
Member Function Documentation
void mxgui::TgaImage::close |
( |
|
) |
|
Get pixels from tha image. This member function can be used to get up to a full horizontal line of pixels from an image.
- Parameters:
-
| p | Start point, within <0,0> and <getWidth()-1,getHeight()-1> |
| colors | pixel data is returned here. Array size must be equal to the length parameter |
| length | number of pixel to retrieve from the starting point. start.x()+length must be less or equal to getWidth() |
- Returns:
- true if success. If false then it means the class does not represent a valid image, or a disk error occurred in case the image is stored on disk.
Reimplemented from mxgui::basic_image_base< T >.
bool mxgui::TgaImage::isOpen |
( |
|
) |
const [inline] |
- Returns:
- true if image is open
void mxgui::TgaImage::open |
( |
const char * |
filename |
) |
|
Open a tga file
- Parameters:
-
| filename | file name of tga image |
Operator =
- Parameters:
-
| rhs | instance to copy from |
- Returns:
- reference to *this
The documentation for this class was generated from the following files:
- tga_image.h
- tga_image.cpp