class new in Git masterWebPImporter
WebP importer plugin.
Supports WebP (
*.webp) RGB and RGBA images.
This plugin depends on the Trade and libwebp libraries and is built if
MAGNUM_WITH_WEBPIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load
"WebPImporter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following. Using libwebp itself as a CMake subproject isn't tested at the moment, so you need to provide it as a system dependency and point
CMAKE_PREFIX_PATH to its installation dir if necessary.
set(MAGNUM_WITH_WEBPIMPORTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::WebPImporter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake and FindWebP.cmake into your
modules/ directory, request the
WebPImporter component of the
MagnumPlugins package and link to the
find_package(MagnumPlugins REQUIRED WebPImporter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::WebPImporter)
WebP only supports 24-bit RGB color with an optional 8-bit alpha channel, which is imported as either PixelFormat::
The importer doesn't support decoding of animated WebP files.
- class AbstractImporter
- Base for importer plugins.