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 int64_t get_memory_usage();
24 // To be used in single frame FileTGA
25 static void read_tga(Asset
*asset
, VFrame
*frame
, VFrame
*data
, VFrame
* &temp
);
26 static void write_tga(Asset
*asset
, VFrame
*frame
, VFrame
*data
, VFrame
* &temp
);
28 int can_copy_from(Edit
*edit
, int64_t position
);
29 static int get_best_colormodel(Asset
*asset
, int driver
);
30 int colormodel_supported(int colormodel
);
31 int read_frame(VFrame
*frame
, VFrame
*data
);
32 int write_frame(VFrame
*frame
, VFrame
*data
, FrameWriterUnit
*unit
);
33 FrameWriterUnit
* new_writer_unit(FrameWriter
*writer
);
39 static void write_data(unsigned char *buffer
,
43 static void read_line(unsigned char *row
,
48 int image_compression
,
54 static void flip_line(unsigned char *row
, int bytes
, int width
);
55 static void rle_read(unsigned char *row
,
60 static void rle_write(unsigned char *buffer
,
64 int64_t &file_offset
);
65 static void bgr2rgb(unsigned char *dest
,
70 static void upsample(unsigned char *dest
,
76 class TGAUnit
: public FrameWriterUnit
79 TGAUnit(FileTGA
*file
, FrameWriter
*writer
);
85 class TGAConfigVideo
: public BC_Window
88 TGAConfigVideo(BC_WindowBase
*gui
, Asset
*asset
);
93 ArrayList
<BC_ListBoxItem
*> compression_items
;
98 class TGACompression
: public BC_PopupTextBox
101 TGACompression(TGAConfigVideo
*gui
,
105 ArrayList
<BC_ListBoxItem
*> *compression_items
);