boinc/samples/image_libs/tgalib.h

23 lines
576 B
C

#ifndef TGALIB_H
#define TGALIB_H
#include <windows.h>
#include <stdio.h>
#define TGA_RGB 2 // This tells us it's a normal RGB (really BGR) file
#define TGA_A 3 // This tells us it's a ALPHA file
#define TGA_RLE 10 // This tells us that the targa is Run-Length Encoded (RLE)
struct tImageTGA
{
int channels; // The channels in the image (3 = RGB : 4 = RGBA)
int sizeX; // The width of the image in pixels
int sizeY; // The height of the image in pixels
unsigned char *data; // The image pixel data
};
tImageTGA *LoadTGA(const char *filename);
#endif