Magnum::Trade::DdsImporter class

DDS image importer plugin.

Supports DirectDraw Surface images (*.dds).


This plugin depends on the Trade library and is built if WITH_DDSIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load "DdsImporter" via Corrade::PluginManager::Manager.

Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:

add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL)

# So the dynamically loaded plugin gets built implicitly
add_dependencies(your-app MagnumPlugins::DdsImporter)

To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your modules/ directory, request the DdsImporter component of the MagnumPlugins package in CMake and link to the MagnumPlugins::DdsImporter target:

find_package(MagnumPlugins REQUIRED DdsImporter)

# ...
target_link_libraries(your-app PRIVATE MagnumPlugins::DdsImporter)

See Downloading and building plugins, Plugin usage with CMake, Loading and using plugins and File format support for more information.

Behavior and limitations

Imports images in the following formats:

The importer recognizes ImporterFlag::Verbose, printing additional info when the flag is enabled.

BC6h, BC7 and other compressed formats are currently not imported correctly.

Base classes

class AbstractImporter
Base for importer plugins.

Constructors, destructors, conversion operators

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