class new in Git masterBcDecImageConverter
BCn-compressed image decoding using bcdec.
This plugin depends on the Trade library and is built if
MAGNUM_WITH_BCDECIMAGECONVERTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load
"BcDecImageConverter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:
set(MAGNUM_WITH_BCDECIMAGECONVERTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::BcDecImageConverter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your
modules/ directory, request the
BcDecImageConverter component of the
MagnumPlugins package and link to the
find_package(MagnumPlugins REQUIRED BcDecImageConverter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::BcDecImageConverter)
The following formats are supported:
Bc1RGBUnorm, Bc1RGBAUnorm, Bc2RGBAUnorm, Bc3RGBAUnorm and Bc7RGBAUnorm is decoded to PixelFormat:: RGBA8Unorm
Bc1RGBSrgb, Bc1RGBASrgb, Bc2RGBASrgb, Bc3RGBASrgb and Bc7RGBASrgb is decoded to PixelFormat:: RGBA8Srgb
Bc4RUnorm / Bc4RSnorm is decoded to PixelFormat:: R8Unorm / R8Snorm
Bc5RGUnorm / Bc5RGSnorm is decoded to PixelFormat:: RG8Unorm / RG8Snorm
Bc6hRGBUfloat / Bc6hRGBSfloat is decoded to PixelFormat:: RGB16F by default, and to PixelFormat:: RGB32F if the
bc6hToFloatconfiguration option is enabled
The output image always has data for whole 4x4 blocks, if the actual size isn't whole blocks, PixelStorage::
Only 2D image conversion is supported at the moment. Image flags, if any, are passed through unchanged.
It's possible to tune various conversion options through configuration(). See below for all options and their default values:
[configuration] # Decode BC6H to 32-bit floats. By default decodes to 16-bit half-floats as # that's the expected output format for this encoding. bc6hToFloat=false
See Editing plugin-specific configuration for more information and an example showing how to edit the configuration values.
- class AbstractImageConverter
- Base for image converter plugins.