Bsoft 2.1.4
Bernard's software package
rwTGA.cpp File Reference

Functions for reading and writing Truevision TGA files. More...

#include "rwTGA.h"
#include "file_util.h"
#include "utilities.h"

Functions

RGB< unsigned char > TGA_to_RGB (const unsigned char *pColorData, unsigned int bitsPerColor)
 
RGBA< unsigned char > TGA_to_RGBA (const unsigned char *pColorData, unsigned int bitsPerColor)
 
int readTGA (Bimage *p, int readdata)
 Reading a Truevision TGA image file format. More...
 
int writeTGA (Bimage *p)
 Writing a Truevision TGA map image file format. More...
 

Variables

int verbose
 

Detailed Description

Functions for reading and writing Truevision TGA files.

Author
Bernard Heymann
Date
Created: 20150811
Modified: 20150815

Function Documentation

◆ readTGA()

int readTGA ( Bimage p,
int  readdata 
)

Reading a Truevision TGA image file format.

Parameters
*pthe image structure.
readdataflag to activate reading of image data.
Returns
int error code (<0 means failure). A color image format. Header size: 18 bytes (fixed). File format extensions: .tga The identifier is ???. Byte order: Little endian. Data types: 1 = byte, 2 = float, 3 = complex float 4 = 3-value vector, 5 = view

◆ TGA_to_RGB()

RGB< unsigned char > TGA_to_RGB ( const unsigned char *  pColorData,
unsigned int  bitsPerColor 
)

◆ TGA_to_RGBA()

RGBA< unsigned char > TGA_to_RGBA ( const unsigned char *  pColorData,
unsigned int  bitsPerColor 
)

◆ writeTGA()

int writeTGA ( Bimage p)

Writing a Truevision TGA map image file format.

Parameters
*pthe image structure.
Returns
int error code (<0 means failure).

Variable Documentation

◆ verbose

int verbose
extern