class
AnyImageImporterAny image importer plugin.
Contents
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:
- Windows Bitmap (
*.bmp
), loaded with any plugin that providesBmpImporter
- DirectDraw Surface (
*.dds
), loaded with DdsImporter or any other plugin that provides it - Graphics Interchange Format (
*.gif
), loaded with any plugin that providesGifImporter
- OpenEXR (
*.exr
), loaded with any plugin that providesOpenExrImporter
- Radiance HDR (
*.hdr
), loaded with any plugin that providesHdrImporter
- JPEG (
*.jpg
,*.jpe
,*.jpeg
), loaded with JpegImporter or any other plugin that provides it - JPEG 2000 (
*.jp2
), loaded with any plugin that providesJpeg2000Importer
- Multiple-image Network Graphics (
*.mng
), loaded with any plugin that providesMngImporter
- Portable Bitmap (
*.pbm
), loaded with any plugin that providesPbmImporter
- ZSoft PCX (
*.pcx
), loaded with any plugin that providesPcxImporter
- Portable Graymap (
*.pgm
), loaded with any plugin that providesPgmImporter
- Softimage PIC (
*.pic
), loaded with any plugin that providesPicImporter
- Portable Anymap (
*.pnm
), loaded with any plugin that providesPnmImporter
- Portable Network Graphics (
*.png
), loaded with PngImporter or any other plugin that provides it - Portable Pixmap (
*.ppm
), loaded with any plugin that providesPpmImporter
- Adobe Photoshop (
*.psd
), loaded with any plugin that providesPsdImporter
- Silicon Graphics (
*.sgi
,*.bw
,*.rgb
,*.rgba
), loaded with any plugin that providesSgiImporter
- Tagged Image File Format (
*.tif
,*.tiff
), loaded with any plugin that providesTiffImporter
- Truevision TGA (
*.tga
,*.vda
,*.icb
,*.vst
), loaded with TgaImporter or any other plugin that provides it
Only loading from files is supported.
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.
Private functions
- auto doFeatures() const override -> Features virtual
- Implementation for features()
- auto doIsOpened() const override -> bool virtual
- Implementation for isOpened()
- void doClose() override virtual
- Implementation for close()
-
void doOpenFile(const std::
string& filename) override virtual - Implementation for openFile()
- auto doImage2DCount() const override -> UnsignedInt virtual
- Implementation for image2DCount()
-
auto doImage2D(UnsignedInt id) override -> Containers::
Optional<ImageData2D> virtual - Implementation for image2D()
Function documentation
void Magnum:: Trade:: AnyImageImporter:: doOpenFile(const std:: string& filename) override virtual private
Implementation for openFile()
If Feature::
UnsignedInt Magnum:: Trade:: AnyImageImporter:: doImage2DCount() const override virtual private
Implementation for image2DCount()
Default implementation returns 0
.