class
TgaImageConverterTGA image converter plugin.
Creates Truevision TGA (*.tga
) files from images with format PixelFormat::
Usage
This plugin depends on the Trade library and is built if MAGNUM_WITH_TGAIMAGECONVERTER
is enabled when building Magnum. To use as a dynamic plugin, load "TgaImageConverter"
via Corrade::
Additionally, if you're using Magnum as a CMake subproject, do the following:
set(MAGNUM_WITH_TGAIMAGECONVERTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app Magnum::TgaImageConverter)
To use as a static plugin or as a dependency of another plugin with CMake, you need to request the TgaImageConverter
component of the Magnum
package and link to the Magnum::TgaImageConverter
target:
find_package(Magnum REQUIRED TgaImageConverter) # ... target_link_libraries(your-app PRIVATE Magnum::TgaImageConverter)
See Downloading and building, Usage with CMake, Loading and using plugins and File format support for more information.
Behavior and limitations
The output is always uncompressed. If you want to make use of RLE compression and have the files smaller, use the StbImageConverter plugin instead.
The TGA file format doesn't have a way to distinguish between 2D and 1D array images. If an image has ImageFlag2D::
Base classes
- class AbstractImageConverter
- Base for image converter plugins.
Constructors, destructors, conversion operators
- TgaImageConverter() explicit
- Default constructor.
-
TgaImageConverter(PluginManager::
AbstractManager& manager, const Containers:: StringView& plugin) explicit - Plugin manager constructor.