Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions

targa.c File Reference

#include "BLI_blenlib.h"
#include "MEM_guardedalloc.h"
#include "imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "IMB_allocimbuf.h"
#include "IMB_filetype.h"

Go to the source code of this file.

Classes

struct  TARGA

Defines

#define GSS(x)   (((uchar *)(x))[1] << 8 | ((uchar *)(x))[0])

Typedefs

typedef struct TARGA TARGA

Functions

static int tga_out1 (unsigned int data, FILE *file)
static int tga_out2 (unsigned int data, FILE *file)
static int tga_out3 (unsigned int data, FILE *file)
static int tga_out4 (unsigned int data, FILE *file)
static short makebody_tga (ImBuf *ibuf, FILE *file, int(*out)(unsigned int, FILE *))
static int dumptarga (struct ImBuf *ibuf, FILE *file)
int imb_savetarga (struct ImBuf *ibuf, const char *name, int flags)
static int checktarga (TARGA *tga, unsigned char *mem)
int imb_is_a_targa (unsigned char *buf)
static void complete_partial_load (struct ImBuf *ibuf, unsigned int *rect)
static void decodetarga (struct ImBuf *ibuf, unsigned char *mem, size_t mem_size, int psize)
static void ldtarga (struct ImBuf *ibuf, unsigned char *mem, size_t mem_size, int psize)
struct ImBufimb_loadtarga (unsigned char *mem, size_t mem_size, int flags)

Detailed Description

Definition in file targa.c.


Define Documentation

#define GSS (   x)    (((uchar *)(x))[1] << 8 | ((uchar *)(x))[0])

Definition at line 49 of file targa.c.

Referenced by checktarga().


Typedef Documentation

typedef struct TARGA TARGA

Function Documentation

static int checktarga ( TARGA tga,
unsigned char *  mem 
) [static]
static void complete_partial_load ( struct ImBuf ibuf,
unsigned int *  rect 
) [static]

Definition at line 346 of file targa.c.

References ImBuf::rect, size(), ImBuf::x, and ImBuf::y.

Referenced by decodetarga(), and ldtarga().

static void decodetarga ( struct ImBuf ibuf,
unsigned char *  mem,
size_t  mem_size,
int  psize 
) [static]

Definition at line 361 of file targa.c.

References complete_partial_load(), NULL, ImBuf::rect, size(), ImBuf::x, and ImBuf::y.

Referenced by imb_loadtarga().

static int dumptarga ( struct ImBuf ibuf,
FILE *  file 
) [static]

Definition at line 192 of file targa.c.

References if(), NULL, ImBuf::planes, ImBuf::rect, size(), ImBuf::x, and ImBuf::y.

Referenced by imb_savetarga().

int imb_is_a_targa ( unsigned char *  buf)

Definition at line 339 of file targa.c.

References checktarga().

struct ImBuf* imb_loadtarga ( unsigned char *  mem,
size_t  mem_size,
int  flags 
) [read]
int imb_savetarga ( struct ImBuf ibuf,
const char *  name,
int  flags 
)
static void ldtarga ( struct ImBuf ibuf,
unsigned char *  mem,
size_t  mem_size,
int  psize 
) [static]

Definition at line 472 of file targa.c.

References complete_partial_load(), NULL, ImBuf::rect, size(), ImBuf::x, and ImBuf::y.

Referenced by imb_loadtarga().

static short makebody_tga ( ImBuf ibuf,
FILE *  file,
int(*)(unsigned int, FILE *)  out 
) [static]

Definition at line 116 of file targa.c.

References copy(), FALSE, ImBuf::rect, TRUE, ImBuf::x, and ImBuf::y.

Referenced by imb_savetarga().

static int tga_out1 ( unsigned int  data,
FILE *  file 
) [static]

Definition at line 71 of file targa.c.

References p.

Referenced by imb_savetarga().

static int tga_out2 ( unsigned int  data,
FILE *  file 
) [static]

Definition at line 80 of file targa.c.

References p.

Referenced by imb_savetarga().

static int tga_out3 ( unsigned int  data,
FILE *  file 
) [static]

Definition at line 91 of file targa.c.

References p.

Referenced by imb_savetarga().

static int tga_out4 ( unsigned int  data,
FILE *  file 
) [static]

Definition at line 103 of file targa.c.

References p.

Referenced by imb_savetarga().