class new in Git masterStbDxtImageConverter
BC1/BC3 compressor using stb_dxt.
Converts uncompressed RGBA images to block-compressed BC1/BC3 images using the stb_
This plugin depends on the Trade library and is built if
WITH_STBDXTIMAGECONVERTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load
"StbDxtImageConverter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:
set(WITH_STBDXTIMAGECONVERTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::StbDxtImageConverter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your
modules/ directory, request the
StbDxtImageConverter component of the
MagnumPlugins package and link to the
find_package(MagnumPlugins REQUIRED StbDxtImageConverter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::StbDxtImageConverter)
Currently, only PixelFormat::
alpha configuration option is disabled, an image with CompressedPixelFormat::
The input image size is expected to be divisible by four in both dimensions. If your image doesn't fit this requirement, you have to pad/crop or resample it first.
Unlike image converters dealing with uncompressed pixel formats, the image isn't Y-flipped on export due to the nontrivial amount of work involved with Y-flipping block-compressed data. This is in line with importers of compressed pixel formats such as DdsImporter, which don't Y-flip compressed formats on import either.
Various compressor options can be set through configuration(). See below for all options and their default values:
[configuration] # Store the alpha channel. If enabled, the output format is BC3 (128 bits per # block), if disabled the format is BC1 (64 bits per block). alpha=true # High-quality mode, does two refinement steps instead of one. ~30–40% slower. highQuality=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.