This is a snapshot of a work-in-progress documentation theme. If you feel lost, miss something, or want to see the original Doxygen docs instead, head over to the archived version of this documentation page.

Magnum::Trade::TgaImporter class

TGA importer plugin.

Supports Truevision TGA (*.tga, *.vda, *.icb, *.vst) uncompressed BGR, BGRA or grayscale images with 8 bits per channel.

This plugin depends on the Trade library and is built if WITH_TGAIMPORTER is enabled when building Magnum. To use as a dynamic plugin, you need to load the "TgaImporter" plugin from MAGNUM_PLUGINS_IMPORTER_DIR. To use as a static plugin or use this as a dependency of another plugin with CMake, you need to request the TgaImporter component of the Magnum package and link to the Magnum::TgaImporter target. See Downloading and building, Usage with CMake and Loading and using plugins for more information.

The images are imported with PixelType::UnsignedByte and PixelFormat::RGB, PixelFormat::RGBA or PixelFormat::Red, respectively. Grayscale images require extension ARB_texture_rg. Imported images are imported with default PixelStorage parameters except for alignment, which may be changed to 1 if the data require it.

In OpenGL ES 2.0, if EXT_texture_rg is not supported and in WebGL 1.0, grayscale images use PixelFormat::Luminance instead of PixelFormat::Red.

Base classes

class AbstractImporter
Base for importer plugins.

Constructors, destructors, conversion operators

TgaImporter() explicit
Default constructor.
TgaImporter(PluginManager::AbstractManager& manager, const std::string& plugin) explicit
Plugin manager constructor.

Private functions

auto doFeatures() const override -> Features virtual
Implementation for features()
auto doIsOpened() const override -> bool virtual
Implementation for isOpened()
void doOpenData(Containers::ArrayView<const char> data) override virtual
Implementation for openData()
void doClose() override virtual
Implementation for close()
auto doImage2DCount() const override -> UnsignedInt virtual
Implementation for image2DCount()
auto doImage2D(UnsignedInt id) override -> Containers::Optional<ImageData2D> virtual
Implementation for image2D()

Function documentation

UnsignedInt Magnum::Trade::TgaImporter::doImage2DCount() const override virtual private

Implementation for image2DCount()

Default implementation returns 0.