|
resonance 1.0.1
|
Reader for Truevision TGA files. More...
#include <atgafile.h>


Public Member Functions | |
| ATgaFile (FILE *pFile) | |
| Construct over an open file. | |
| virtual int | StartRead () |
| Slot 1. | |
| virtual int | ReadFrame (ABitmap &image, int *pbEnd) |
| Slot 3. | |
| virtual int | Write (const ABitmap &bitmap) |
| Slot 5. | |
| Public Member Functions inherited from AGfxFile | |
| AGfxFile (FILE *pFile) | |
| Construct over an open file. | |
| virtual void | SetUnreadWord (int nWord) |
| Set mUnreadWord. | |
| virtual | ~AGfxFile () |
| Close the file. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from AGfxFile | |
| static AGfxFile * | Open (const char *pszPath, int *pnError, bool bRead) |
| Open an image file and construct the reader for its extension. | |
| static int | Write (const char *pszPath, const ABitmap &bitmap) |
| Write a bitmap to a file in the format its extension selects. | |
| Protected Attributes inherited from AGfxFile | |
| FILE * | mFile |
| ARect | mBounds |
| int | mDuration |
Reader for Truevision TGA files.
Its single public base is AGfxFile at offset zero. Its table at 0x0083d8d0 overrides slots 1, 3, 4, and 5. AGfxFile::Open() allocates 0x30 bytes for it.
The reader accepts uncompressed and run length encoded true colour images with no colour map, image types 2 and 10, and always produces a kABitmapFormatLinear32 bitmap. A pixel depth other than 32 is read as three bytes a pixel.
|
inlineexplicit |
|
virtual |
Slot 1.
Read the 18 byte header and skip the image identifier.
A colour map, or an image type other than 2 and 10, gives kAGfxFileBadFormat.
Implements AGfxFile.
|
virtual |
Slot 3.
Read the image.
The end is reported only once mImageRead is set, and nothing sets it, so every call reads again from the current file position. A failed read releases the pixel rectangle through the single-object path.
| image | Receives the image. |
| pbEnd | Set to one when mImageRead is set. |
Implements AGfxFile.
|
virtual |
Slot 5.
Writing is not implemented.
| bitmap | The bitmap, not read. |
Implements AGfxFile.