AvifImporter class new in Git master
AVIF importer plugin.
Imports AV1 Image File Format (*.avif) images using the libavif library.
Usage
This plugin depends on the Trade and libavif libraries and is built if MAGNUM_WITH_AVIFIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load "AvifImporter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following. Using libavif 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_AVIFIMPORTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::AvifImporter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your modules/ directory, request the AvifImporter component of the MagnumPlugins package and link to the MagnumPlugins::AvifImporter target:
find_package(MagnumPlugins REQUIRED AvifImporter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::AvifImporter)
See Downloading and building plugins, Plugin usage with CMake, Loading and using plugins and File format support for more information.
Behavior and limitations
Supports grayscale, grayscale+alpha, RGB and RGBA images with 8, 10 and 12 bits per channel. 10- and 12-bit images are expanded to 16 bits.
RGB images are imported as PixelFormat::
The importer always imports only the first image in the file, animation- and timing-related data are ignored.
Base classes
- class AbstractImporter
- Base for importer plugins.
Constructors, destructors, conversion operators
-
AvifImporter(PluginManager::
AbstractManager& manager, const Containers:: StringView& plugin) explicit - Plugin manager constructor.