Magnum::Trade::EtcDecImageConverter class new in Git master

ETC/EAC-compressed image decoding using etcdec.

Decodes ETC1, ETC2 and EAC blocks to uncompressed RGBA using the etcdec library. See also the BcDecImageConverter plugin for decoding BCn images.


This plugin depends on the Trade library and is built if MAGNUM_WITH_ETCDECIMAGECONVERTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load "EtcDecImageConverter" 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::EtcDecImageConverter)

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

find_package(MagnumPlugins REQUIRED EtcDecImageConverter)

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

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

Behavior and limitations

The following formats are supported:

The output image always has data for whole 4x4 blocks, if the actual size isn't whole blocks, PixelStorage::setRowLength() is set to treat the extra pixels at the end of each row as padding. Non-default CompressedPixelStorage isn't supported in input images.

Only 2D image conversion is supported at the moment. Image flags, if any, are passed through unchanged.

Plugin-specific configuration

It's possible to tune various conversion options through configuration(). See below for all options and their default values:

# Decode EAC R11 and RG11 to 32-bit floats. By default decodes to 16-bit
# integers as that's the expected output format for this encoding.

See Editing plugin-specific configuration for more information and an example showing how to edit the configuration values.

Base classes

class AbstractImageConverter
Base for image converter plugins.

Constructors, destructors, conversion operators

EtcDecImageConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin) explicit
Plugin manager constructor.