7 class FileTGA
: public FileList
10 FileTGA(Asset
*asset
, File
*file
);
13 static int check_sig(Asset
*asset
);
14 static void get_parameters(BC_WindowBase
*parent_window
,
16 BC_WindowBase
* &format_window
,
19 int read_frame_header(char *path
);
20 static char* compression_to_str(char *compression
);
21 static char* str_to_compression(char *string
);
23 // To be used in single frame FileTGA
24 static void read_tga(Asset
*asset
, VFrame
*frame
, VFrame
*data
, VFrame
* &temp
);
25 static void write_tga(Asset
*asset
, VFrame
*frame
, VFrame
*data
, VFrame
* &temp
);
27 int can_copy_from(Edit
*edit
, int64_t position
);
28 static int get_best_colormodel(Asset
*asset
, int driver
);
29 int colormodel_supported(int colormodel
);
30 int read_frame(VFrame
*frame
, VFrame
*data
);
31 int write_frame(VFrame
*frame
, VFrame
*data
, FrameWriterUnit
*unit
);
32 FrameWriterUnit
* new_writer_unit(FrameWriter
*writer
);
38 static void write_data(unsigned char *buffer
,
42 static void read_line(unsigned char *row
,
47 int image_compression
,
53 static void flip_line(unsigned char *row
, int bytes
, int width
);
54 static void rle_read(unsigned char *row
,
59 static void rle_write(unsigned char *buffer
,
63 int64_t &file_offset
);
64 static void bgr2rgb(unsigned char *dest
,
69 static void upsample(unsigned char *dest
,
75 class TGAUnit
: public FrameWriterUnit
78 TGAUnit(FileTGA
*file
, FrameWriter
*writer
);
84 class TGAConfigVideo
: public BC_Window
87 TGAConfigVideo(BC_WindowBase
*gui
, Asset
*asset
);
92 ArrayList
<BC_ListBoxItem
*> compression_items
;
97 class TGACompression
: public BC_PopupTextBox
100 TGACompression(TGAConfigVideo
*gui
,
104 ArrayList
<BC_ListBoxItem
*> *compression_items
);