Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

FileTGA Class Reference

#include <filetga.h>

Inheritance diagram for FileTGA:

FileList FileBase List of all members.

Public Member Functions

 FileTGA (Asset *asset, File *file)
 ~FileTGA ()
int read_frame_header (char *path)
int get_memory_usage ()
int can_copy_from (Edit *edit, int64_t position)
int colormodel_supported (int colormodel)
int read_frame (VFrame *frame, VFrame *data)
int write_frame (VFrame *frame, VFrame *data, FrameWriterUnit *unit)
FrameWriterUnitnew_writer_unit (FrameWriter *writer)

Static Public Member Functions

static int check_sig (Asset *asset)
static void get_parameters (BC_WindowBase *parent_window, Asset *asset, BC_WindowBase *&format_window, int audio_options, int video_options)
static char * compression_to_str (char *compression)
static char * str_to_compression (char *string)
static void read_tga (Asset *asset, VFrame *frame, VFrame *data, VFrame *&temp)
static void write_tga (Asset *asset, VFrame *frame, VFrame *data, VFrame *&temp)
static int get_best_colormodel (Asset *asset, int driver)

Public Attributes

VFrame * temp

Static Private Member Functions

static void write_data (unsigned char *buffer, VFrame *data, int64_t &file_offset, int64_t len)
static void read_line (unsigned char *row, unsigned char *data, int64_t &file_offset, int image_type, int bpp, int image_compression, int bytes, int width, int fliphoriz, int alphabits, int data_size)
static void flip_line (unsigned char *row, int bytes, int width)
static void rle_read (unsigned char *row, unsigned char *data, int64_t &file_offset, int bytes, int width)
static void rle_write (unsigned char *buffer, int width, int bytes, VFrame *frame, int64_t &file_offset)
static void bgr2rgb (unsigned char *dest, unsigned char *src, int width, int bytes, int alpha)
static void upsample (unsigned char *dest, unsigned char *src, int width, int bytes)

Detailed Description

Definition at line 7 of file filetga.h.


Constructor & Destructor Documentation

FileTGA::FileTGA Asset asset,
File file
 

Definition at line 22 of file filetga.C.

References temp.

FileTGA::~FileTGA  ) 
 

Definition at line 28 of file filetga.C.

References temp.


Member Function Documentation

void FileTGA::bgr2rgb unsigned char *  dest,
unsigned char *  src,
int  width,
int  bytes,
int  alpha
[static, private]
 

Definition at line 787 of file filetga.C.

Referenced by read_line(), read_tga(), and write_tga().

int FileTGA::can_copy_from Edit edit,
int64_t  position
[virtual]
 

Reimplemented from FileBase.

Definition at line 129 of file filetga.C.

References Edit::asset, and Asset::format.

int FileTGA::check_sig Asset asset  )  [static]
 

Definition at line 33 of file filetga.C.

References fclose(), fopen(), fread(), and Asset::path.

Referenced by File::open_file().

int FileTGA::colormodel_supported int  colormodel  )  [virtual]
 

Reimplemented from FileBase.

Definition at line 139 of file filetga.C.

char * FileTGA::compression_to_str char *  compression  )  [static]
 

Definition at line 111 of file filetga.C.

References _, TGA_RGB, TGA_RGB_NAME, TGA_RGB_RLE, TGA_RGB_RLE_NAME, TGA_RGBA, TGA_RGBA_NAME, TGA_RGBA_RLE, and TGA_RGBA_RLE_NAME.

Referenced by str_to_compression(), and TGAConfigVideo::TGAConfigVideo().

void FileTGA::flip_line unsigned char *  row,
int  bytes,
int  width
[static, private]
 

Definition at line 624 of file filetga.C.

References temp.

Referenced by read_line().

int FileTGA::get_best_colormodel Asset asset,
int  driver
[static]
 

Definition at line 144 of file filetga.C.

References TGA_RGB, TGA_RGB_RLE, TGA_RGBA, TGA_RGBA_RLE, and Asset::vcodec.

Referenced by File::get_best_colormodel().

int FileTGA::get_memory_usage  )  [virtual]
 

Reimplemented from FileList.

Definition at line 172 of file filetga.C.

References FileList::get_memory_usage(), and temp.

void FileTGA::get_parameters BC_WindowBase *  parent_window,
Asset asset,
BC_WindowBase *&  format_window,
int  audio_options,
int  video_options
[static]
 

Definition at line 78 of file filetga.C.

References TGAConfigVideo::create_objects().

Referenced by File::get_options().

FrameWriterUnit * FileTGA::new_writer_unit FrameWriter writer  )  [virtual]
 

Reimplemented from FileList.

Definition at line 167 of file filetga.C.

int FileTGA::read_frame VFrame *  frame,
VFrame *  data
[virtual]
 

Reimplemented from FileList.

Definition at line 153 of file filetga.C.

References FileBase::asset, read_tga(), and temp.

int FileTGA::read_frame_header char *  path  )  [virtual]
 

Reimplemented from FileList.

Definition at line 188 of file filetga.C.

References FileBase::asset, fclose(), fopen(), fread(), HEADERSIZE, Asset::height, TGA_RGB, TGA_RGB_RLE, TGA_RGBA, TGA_RGBA_RLE, Asset::vcodec, and Asset::width.

void FileTGA::read_line unsigned char *  row,
unsigned char *  data,
int64_t &  file_offset,
int  image_type,
int  bpp,
int  image_compression,
int  bytes,
int  width,
int  fliphoriz,
int  alphabits,
int  data_size
[static, private]
 

Definition at line 574 of file filetga.C.

References bgr2rgb(), flip_line(), rle_read(), TGA_COMP_RLE, TGA_TYPE_COLOR, and upsample().

Referenced by read_tga().

void FileTGA::read_tga Asset asset,
VFrame *  frame,
VFrame *  data,
VFrame *&  temp
[static]
 

Definition at line 229 of file filetga.C.

References bgr2rgb(), FOOTERSIZE, HEADERSIZE, height, read_line(), TGA_COMP_NONE, TGA_COMP_RLE, TGA_TYPE_COLOR, TGA_TYPE_GRAY, TGA_TYPE_MAPPED, upsample(), and width.

Referenced by read_frame().

void FileTGA::rle_read unsigned char *  row,
unsigned char *  data,
int64_t &  file_offset,
int  bytes,
int  width
[static, private]
 

Definition at line 646 of file filetga.C.

Referenced by read_line().

void FileTGA::rle_write unsigned char *  buffer,
int  width,
int  bytes,
VFrame *  frame,
int64_t &  file_offset
[static, private]
 

Definition at line 700 of file filetga.C.

References write_data().

Referenced by write_tga().

char * FileTGA::str_to_compression char *  string  )  [static]
 

Definition at line 120 of file filetga.C.

References compression_to_str(), TGA_RGB, TGA_RGB_RLE, TGA_RGBA, and TGA_RGBA_RLE.

Referenced by TGACompression::handle_event().

void FileTGA::upsample unsigned char *  dest,
unsigned char *  src,
int  width,
int  bytes
[static, private]
 

Definition at line 827 of file filetga.C.

Referenced by read_line(), and read_tga().

void FileTGA::write_data unsigned char *  buffer,
VFrame *  data,
int64_t &  file_offset,
int64_t  len
[static, private]
 

Definition at line 554 of file filetga.C.

Referenced by rle_write(), and write_tga().

int FileTGA::write_frame VFrame *  frame,
VFrame *  data,
FrameWriterUnit unit
[virtual]
 

Reimplemented from FileList.

Definition at line 159 of file filetga.C.

References FileBase::asset, TGAUnit::temp, and write_tga().

void FileTGA::write_tga Asset asset,
VFrame *  frame,
VFrame *  data,
VFrame *&  temp
[static]
 

Definition at line 409 of file filetga.C.

References bgr2rgb(), rle_write(), TGA_RGB_RLE, TGA_RGBA, TGA_RGBA_RLE, Asset::vcodec, and write_data().

Referenced by write_frame().


Member Data Documentation

VFrame* FileTGA::temp
 

Reimplemented from FileList.

Definition at line 36 of file filetga.h.

Referenced by FileTGA(), flip_line(), get_memory_usage(), read_frame(), and ~FileTGA().


The documentation for this class was generated from the following files:
Generated on Sun Jan 8 13:39:15 2006 for Cinelerra-svn by  doxygen 1.4.4