00001
00002
00003
00004 #ifndef COURNIA_TGA_IMAGE_H
00005 #define COURNIA_TGA_IMAGE_H 1
00006
00007 #include <string>
00008 #include "image.h"
00009
00010 namespace image {
00012 namespace tga
00013 {
00014 typedef unsigned char byte;
00015 struct header_t
00016 {
00017 byte id_length;
00018 byte color_map_type;
00019 byte image_type;
00020 byte color_map[ 5 ];
00021 short x_origin;
00022 short y_origin;
00023 short width;
00024 short height;
00025 byte bpp;
00026 byte image_descriptor;
00027 };
00028
00030
00033 image_t* load( const std::string& filename );
00034
00036
00039 image_t* load( std::istream& stream );
00040
00042
00045 bool can_load( const std::string& filename );
00046
00048
00053 bool can_load( std::istream& stream );
00054 }
00055 }
00056
00057 #endif