#include <string.h>
#include <gandalf/image/io/targa_io.h>
#include <gandalf/image/io/image_io.h>
#include <gandalf/image/image_rgb_uint8.h>
#include <gandalf/image/image_rgba_uint8.h>
#include <gandalf/common/misc_error.h>
Defines | |
#define | TARGA_ID_LENGTH_OFFSET 0 |
#define | TARGA_COLOURMAP_TYPE_OFFSET 1 |
#define | TARGA_DATA_TYPE_OFFSET 2 |
#define | TARGA_COLOURMAP_ORIGIN_OFFSET 3 |
#define | TARGA_COLOURMAP_LENGTH_OFFSET 5 |
#define | TARGA_COLOURMAP_ENTRYSIZE_OFFSET 7 |
#define | TARGA_XORIGIN_OFFSET 8 |
#define | TARGA_YORIGIN_OFFSET 10 |
#define | TARGA_WIDTH_OFFSET 12 |
#define | TARGA_HEIGHT_OFFSET 14 |
#define | TARGA_PIXEL_SIZE_OFFSET 16 |
#define | TARGA_IMAGE_DESCRIPTOR_OFFSET 17 |
#define | TARGA_DATA_TYPE_MAPPED 1 |
#define | TARGA_DATA_TYPE_RGB 2 |
#define | TARGA_DATA_TYPE_RLE_MAPPED 9 |
#define | TARGA_DATA_TYPE_RLE_RGB 10 |
#define | BIG_BUFFER_SIZE 264 |
Functions | |
Gan_Bool | gan_image_is_targa (const unsigned char *magic_string, size_t length) |
Determines whether an image is a TARGA image using the magic number. | |
Gan_Image * | gan_read_targa_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header) |
Reads a RGB colour image file in TARGA format from a stream. | |
Gan_Image * | gan_read_targa_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header) |
Reads a RGB colour image file in TARGA format. | |
void | gan_initialise_targa_header_struct (Gan_TargaHeaderStruct *octrlstr) |
Initialises the output control structure for Targa files. | |
Gan_Bool | gan_write_targa_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr) |
Writes a RGB colour image to a file stream in TARGA format. | |
Gan_Bool | gan_write_targa_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr) |
Writes a RGB colour image file in TARGA format. |
Part of: Gandalf Library