class new in 2020.06IcoImporter
ICO importer plugin.
Loads Windows icon/cursor (
*.cur) files with embedded PNGs.
This plugin depends on the Trade library and is built if
MAGNUM_WITH_ICOIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load
"IcoImporter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:
set(MAGNUM_WITH_ICOIMPORTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::IcoImporter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your
modules/ directory, request the
IcoImporter component of the
MagnumPlugins package in CMake and link to the
find_package(MagnumPlugins REQUIRED IcoImporter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::IcoImporter)
The importer will report count of all icon sizes in image2DLevelCount() and you can then import each using the second parameter of image2D(). Currently, only embedded PNGs are supported — for them it will delegate loading to any plugin that provides
PngImporter; for images that are BMPs, image2D() will fail. You can use DevIlImageImporter in that case instead, but please be aware of its limitations.
- class AbstractImporter
- Base for importer plugins.