Magnum::Trade::AnyImageImporter class

Any image importer plugin.

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

This plugin depends on the Trade library and is built if WITH_ANYIMAGEIMPORTER is enabled when building Magnum. To use as a dynamic plugin, you need to load the "AnyImageImporter" 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 AnyImageImporter component of the Magnum package and link to the Magnum::AnyImageImporter target. See Downloading and building, Usage with CMake and Loading and using plugins for more information.

Supported formats:

  • Basis Universal (*.basis), loaded BasisImporter or any other plugin that provides it
  • Windows Bitmap (*.bmp), loaded with any plugin that provides BmpImporter
  • DirectDraw Surface (*.dds or data with corresponding signature), loaded with DdsImporter or any other plugin that provides it
  • Graphics Interchange Format (*.gif), loaded with any plugin that provides GifImporter
  • OpenEXR (*.exr or data with corresponding signature), loaded with any plugin that provides OpenExrImporter
  • Radiance HDR (*.hdr or data with corresponding signature), loaded with any plugin that provides HdrImporter
  • JPEG (*.jpg, *.jpe, *.jpeg or data with corresponding signature), loaded with JpegImporter or any other plugin that provides it
  • JPEG 2000 (*.jp2), loaded with any plugin that provides Jpeg2000Importer
  • Multiple-image Network Graphics (*.mng), loaded with any plugin that provides MngImporter
  • Portable Bitmap (*.pbm), loaded with any plugin that provides PbmImporter
  • ZSoft PCX (*.pcx), loaded with any plugin that provides PcxImporter
  • Portable Graymap (*.pgm), loaded with any plugin that provides PgmImporter
  • Softimage PIC (*.pic), loaded with any plugin that provides PicImporter
  • Portable Anymap (*.pnm), loaded with any plugin that provides PnmImporter
  • Portable Network Graphics (*.png or data with corresponding signature), loaded with PngImporter or any other plugin that provides it
  • Portable Pixmap (*.ppm), loaded with any plugin that provides PpmImporter
  • Adobe Photoshop (*.psd), loaded with any plugin that provides PsdImporter
  • Silicon Graphics (*.sgi, *.bw, *.rgb, *.rgba), loaded with any plugin that provides SgiImporter
  • Tagged Image File Format (*.tif, *.tiff), loaded with any plugin that provides TiffImporter
  • Truevision TGA (*.tga, *.vda, *.icb, *.vst or data with corresponding signature), loaded with TgaImporter or any other plugin that provides it

Detecting file type through openData() is supported only for a subset of formats that are marked as such in the list above.

Base classes

class AbstractImporter
Base for importer plugins.

Constructors, destructors, conversion operators

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