|
|
|
|
@ -64,25 +64,25 @@ class TGAIMPORTER_EXPORT TgaImporter: public AbstractImporter {
|
|
|
|
|
|
|
|
|
|
void close(); |
|
|
|
|
|
|
|
|
|
inline unsigned int image2DCount() const { return _image ? 1 : 0; } |
|
|
|
|
ImageData2D* image2D(unsigned int id); |
|
|
|
|
inline std::uint32_t image2DCount() const { return _image ? 1 : 0; } |
|
|
|
|
ImageData2D* image2D(std::uint32_t id); |
|
|
|
|
|
|
|
|
|
#pragma pack(1) |
|
|
|
|
/** @brief TGA file header */ |
|
|
|
|
/** @todoc Enable @c INLINE_SIMPLE_STRUCTS again when unclosed <component> in tagfile is fixed*/ |
|
|
|
|
struct TGAIMPORTER_LOCAL Header { |
|
|
|
|
char identsize; /**< @brief Size of ID field that follows header (0) */ |
|
|
|
|
char colorMapType; /**< @brief 0 = None, 1 = paletted */ |
|
|
|
|
char imageType; /**< @brief 0 = none, 1 = indexed, 2 = rgb, 3 = grey, +8=rle */ |
|
|
|
|
unsigned short colorMapStart; /**< @brief First color map entry */ |
|
|
|
|
unsigned short colorMapLength; /**< @brief Number of colors */ |
|
|
|
|
unsigned char colorMapBpp; /**< @brief Bits per palette entry */ |
|
|
|
|
unsigned short beginX; /**< @brief %Image x origin */ |
|
|
|
|
unsigned short beginY; /**< @brief %Image y origin */ |
|
|
|
|
unsigned short width; /**< @brief %Image width */ |
|
|
|
|
unsigned short height; /**< @brief %Image height */ |
|
|
|
|
char bpp; /**< @brief Bits per pixel (8, 16, 24, 32) */ |
|
|
|
|
char descriptor; /**< @brief %Image descriptor */ |
|
|
|
|
std::uint8_t identsize; /**< @brief Size of ID field that follows header (0) */ |
|
|
|
|
std::uint8_t colorMapType; /**< @brief 0 = None, 1 = paletted */ |
|
|
|
|
std::uint8_t imageType; /**< @brief 0 = none, 1 = indexed, 2 = rgb, 3 = grey, +8=rle */ |
|
|
|
|
std::uint16_t colorMapStart; /**< @brief First color map entry */ |
|
|
|
|
std::uint16_t colorMapLength; /**< @brief Number of colors */ |
|
|
|
|
std::uint8_t colorMapBpp; /**< @brief Bits per palette entry */ |
|
|
|
|
std::uint16_t beginX; /**< @brief %Image x origin */ |
|
|
|
|
std::uint16_t beginY; /**< @brief %Image y origin */ |
|
|
|
|
std::uint16_t width; /**< @brief %Image width */ |
|
|
|
|
std::uint16_t height; /**< @brief %Image height */ |
|
|
|
|
std::uint8_t bpp; /**< @brief Bits per pixel (8, 16, 24, 32) */ |
|
|
|
|
std::uint8_t descriptor; /**< @brief %Image descriptor */ |
|
|
|
|
}; |
|
|
|
|
#pragma pack(8) |
|
|
|
|
|
|
|
|
|
|