Magnum::Trade::AnyImageConverter class

Any image converter plugin.

Detects file type based on file extension, loads corresponding plugin and then tries to convert the file with it.

This plugin depends on the Trade library and is built if WITH_ANYIMAGECONVERTER is enabled when building Magnum. To use as a dynamic plugin, you need to load the "AnyImageConverter" plugin from MAGNUM_PLUGINS_IMPORTER_DIR. To use as a static plugin or as a dependency of another plugin with CMake, you need to request the AnyImageConverter component of the Magnum package and link to the Magnum::AnyImageConverter target. See Downloading and building, Usage with CMake and Loading and using plugins for more information.

Supported formats for uncompressed data:

  • OpenEXR (*.exr), converted with any plugin that provides OpenExrImageConverter
  • Windows Bitmap (*.bmp), converted with any plugin that provides BmpImageConverter
  • Radiance HDR (*.hdr), converted with any plugin that provides HdrImageConverter
  • JPEG (*.jpg, *.jpe, *.jpeg), converted with JpegImageConverter or any other plugin that provides it
  • Portable Network Graphics (*.png), converted with PngImageConverter or any other plugin that provides it
  • Truevision TGA (*.tga, *.vda, *.icb, *.vst), converted with TgaImageConverter or any other plugin that provides it

No supported formats for compressed data yet.

Only exporting to files is supported.

Base classes

class AbstractImageConverter
Base for image converter plugins.

Constructors, destructors, conversion operators

AnyImageConverter(PluginManager::Manager<AbstractImageConverter>& manager) explicit
Constructor with access to plugin manager.
AnyImageConverter(PluginManager::AbstractManager& manager, const std::string& plugin) explicit
Plugin manager constructor.