Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00015 enum {
00016 TGA_OK,
00017 TGA_ERROR_FILE_OPEN,
00018 TGA_ERROR_READING_FILE,
00019 TGA_ERROR_INDEXED_COLOR,
00020 TGA_ERROR_MEMORY,
00021 TGA_ERROR_COMPRESSED_FILE,
00022 };
00023
00025 typedef struct sImageTGA {
00026 int status;
00027 unsigned char type, pixelDepth;
00028
00030 short int width;
00031
00033 short int height;
00034
00036 unsigned char *imageData;
00037 int flipped;
00038 } tImageTGA;
00039
00041 void tgaLoadHeader(FILE *file, tImageTGA *info);
00042
00044 void tgaLoadImageData(FILE *file, tImageTGA *info);
00045
00047 tImageTGA * tgaLoad(const char *filename);
00048
00049
00050 void tgaRGBtogreyscale(tImageTGA *info);
00051
00053 void tgaDestroy(tImageTGA *info);
00054
00055