Magnum::Trade::DevIlImageImporter class

DevIL Image importer plugin.

Supports a large variety of image file types using the DevIL library, including (note that the list is incomplete):

  • Windows Bitmap (*.bmp)
  • Dr. Halo (*.cut)
  • Multi-PCX (*.dcx)
  • Dicom (*.dicom, *.dcm)
  • DirectDraw Surface (*.dds)
  • OpenEXR (*.exr)
  • Flexible Image Transport System (*.fits, *.fit)
  • Heavy Metal: FAKK 2 (*.ftx)
  • Graphics Interchange Format (*.gif)
  • Radiance HDR (*.hdr)
  • Macintosh icon (*.icns)
  • Windows icon/cursor (*.ico, *.cur)
  • Interchange File Format (*.iff)
  • Infinity Ward Image (*.iwi)
  • JPEG (*.jpg, *.jpe, *.jpeg)
  • JPEG 2000 (*.jp2)
  • Interlaced Bitmap (*.lbm)
  • Homeworld texture (*.lif)
  • Half-Life Model (*.mdl)
  • Multiple-image Network Graphics (*.mng)
  • MPEG-1 Audio Layer 3 (*.mp3)
  • PaintShop Pro Palette (*.pal)
  • Halo Palette (*.pal)
  • Kodak PhotoCD (*.pcd)
  • ZSoft PCX (*.pcx)
  • Softimage PIC (*.pic)
  • Portable Network Graphics (*.png)
  • Portable Anymap (*.pbm, *.pgm, *.ppm, *.pnm)
  • Alias PIX (*.pix)
  • Adobe Photoshop (*.psd)
  • PaintShop Pro (*.psp)
  • Pixar (*.pxr)
  • Raw data (*.raw)
  • Homeworld 2 Texture (*.rot)
  • Silicon Graphics (*.sgi, *.bw, *.rgb, *.rgba)
  • Creative Assembly Texture (*.texture)
  • Truevision TGA (*.tga, *.vda, *.icb, *.vst)
  • Tagged Image File Format (*.tif, *.tiff)
  • Gamecube Texture (*.tpl)
  • Unreal Texture (*.utx)
  • Quake 2 Texture (*.wal)
  • Valve Texture Format (*.vtf)
  • HD Photo (*.wdp, *.hdp)
  • X Pixel Map (*.xpm)
  • Doom graphics

This plugin depends on the Trade and DevIL libraries and is built if WITH_DEVILIMAGEIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, you need to load the "DevIlImageImporter" 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 DevIlImageImporter component of the MagnumPlugins package in CMake and link to the MagnumPlugins::DevIlImageImporter target. See Downloading and building plugins, Plugin usage with CMake and Loading and using plugins for more information.

This plugins provides BmpImporter, DdsImporter, OpenExrImporter, GifImporter, HdrImporter, JpegImporter, Jpeg2000Importer, MngImporter, PcxImporter, PbmImporter, PgmImporter, PicImporter, PngImporter, PnmImporter, PpmImporter, PsdImporter, SgiImporter, TgaImporter and TiffImporter plugins.

The images are imported as PixelFormat::R8Unorm, PixelFormat::RG8Unorm, PixelFormat::RGB8Unorm and PixelFormat::RGBA8Unorm. BGR/BGRA and all other formats will be converted to PixelFormat::RGBA8Unorm. Images are imported with default PixelStorage parameters except for alignment, which may be changed to 1 if the data require it.

Base classes

class AbstractImporter
Base for importer plugins.

Constructors, destructors, conversion operators

DevIlImageImporter() explicit
Default constructor.
DevIlImageImporter(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 doOpenData(Containers::ArrayView<const char> data) override virtual
Implementation for openData()
auto doImage2DCount() const override -> UnsignedInt virtual
Implementation for image2DCount()
auto doImage2D(UnsignedInt id) override -> Containers::Optional<ImageData2D> virtual
Implementation for image2D()

Function documentation

UnsignedInt Magnum::Trade::DevIlImageImporter::doImage2DCount() const override virtual private

Implementation for image2DCount()

Default implementation returns 0.