Feature guide » File format support

Support tables for widely used image, scene, audio and font formats.

The AnyAudioImporter, AnyImageImporter, AnySceneImporter, AnyImageConverter, AnySceneConverter and AnyShaderConverter plugins described on the previous page can be used for generic handling of any of the formats they recognize and they'll proxy the operation to a concrete plugin implementation.

To support diverse use cases, there's commonly more than one alternative implementation for given format. The following tables list the most widely used formats with corresponding plugin implementations and known caveats for each. When one format is supported by more than one plugin, you can use PluginManager::AbstractManager::setPreferredPlugins() to prioritize a particular plugin implementation.

See the Legend section at the bottom of the page for a detailed explanation of the color-coded columns.

Image importers

Together with scene importers derived from Trade::AbstractImporter.

FormatGeneric plugin aliasPlugin nameCaveatsDependenciesLicense
ASTC (*.astc)AstcImporterAstcImporternonenone
Basis Universal (*.basis)BasisImporterBasisImporternonebundleable, tinyApache-2.0
BMP
(*.bmp)
BmpImporterStbImageImporterminorbundledpublic domain
DevIlImageImporterunknownexternalLGPLv2.1
DirectDraw Surface
(*.dds)
DdsImporterDdsImporternonenone
DevIlImageImportersevereexternalLGPLv2.1
OpenEXR (*.exr)OpenExrImporterOpenExrImportersomebundleableBSD 3-clause
DevIlImageImportersevereexternalLGPLv2.1
GIF
(*.gif)
GifImporterStbImageImporterminorbundledpublic domain
DevIlImageImportersevereexternalLGPLv2.1
Radiance HDR
(*.hdr)
HdrImporterStbImageImporternonebundledpublic domain
DevIlImageImporternoneexternalLGPLv2.1
ICO
(*.ico, *.cur)
IcoImporterIcoImportersomenone
DevIlImageImportersevereexternalLGPLv2.1
JPEG
(*.jpg, *.jpe, *.jpeg)
JpegImporterJpegImporternoneexternal, tinyLibjpeg
StbImageImportersomebundledpublic domain
DevIlImageImporternoneexternalLGPLv2.1
KTX2 (*.ktx2)KtxImporterKtxImportersomenone
PNG
(*.png)
PngImporterPngImporterminorexternal, tinylibPNG
StbImageImporternonebundledpublic domain
DevIlImageImportersomeexternalLGPLv2.1
PSD
(*.psd)
PsdImporterStbImageImporterseverebundledpublic domain
DevIlImageImportersevereexternalLGPLv2.1
Truevision TGA
(*.tga, *.vda, *.icb, *.vst)
TgaImporterTgaImporterminornone
StbImageImporternonebundledpublic domain
DevIlImageImporterunknownexternalLGPLv2.1
WebP (*.webp)WebPImporterWebPImporterminorexternal

BSD 3-clause

In addition to the above, DevIlImageImporter and StbImageImporter support many more formats.

Image converters

Derived from Trade::AbstractImageConverter.

FormatGeneric plugin aliasPlugin nameCaveatsDependenciesLicense
Basis Universal (*.basis)BasisImageConverterBasisImageConvertersomebundleableApache-2.0
Windows Bitmap (*.bmp)BmpImageConverterStbImageConverterunknownbundledpublic domain
OpenEXR (*.exr)OpenExrImageConverterOpenExrImageConvertersomebundleableBSD 3-clause
MiniExrImageConverterseverebundledpublic domain
Radiance HDR (*.hdr)HdrImageConverterStbImageConverternonebundledpublic domain
JPEG
(*.jpg, *.jpe, *.jpeg)
JpegImageConverterJpegImageConverterminorexternal, tinyLibjpeg
StbImageConverterminorbundledpublic domain
KTX2 (*.ktx2)KtxImageConverterKtxImageConvertersomenone
PNG
(*.png)
PngImageConverterPngImageConverternoneexternal, tinylibPNG
StbImageConvertersomebundledpublic domain
Truevision TGA
(*.tga, *.vda, *.icb, *.vst)
TgaImageConverterTgaImageConverterminornone
StbImageConverternonebundledpublic domain

Scene importers

Together with image importers derived from Trade::AbstractImporter.

FormatGeneric plugin aliasPlugin nameCaveatsDependenciesLicense
COLLADA (*.dae)ColladaImporterAssimpImporterseverebundleableBSD 3-clause
Autodesk FBX (*.fbx)FbxImporterAssimpImporterunknownbundleableBSD 3-clause
OBJ
(*.obj)
ObjImporterObjImporterseverenone
AssimpImportersomebundleableBSD 3-clause
Open Game Engine Exchange
(*.ogex)
OpenGexImporterOpenGexImportersomenone
AssimpImporterunknownbundleableBSD 3-clause
glTF
(*.gltf, *.glb)
GltfImporterGltfImporterminornone
TinyGltfImporter deprecatedsomebundledMIT
AssimpImporterseverebundleableBSD 3-clause
Stanford PLY
(*.ply)
StanfordImporterStanfordImportersomenone
AssimpImporterseverebundleableBSD 3-clause
STL
(*.stl)
StlImporterStlImporterminornone
AssimpImporterunknownbundleableBSD 3-clause

In addition to the above, AssimpImporter supports many more formats.

Scene converters

Derived from Trade::AbstractSceneConverter.

FormatGeneric plugin aliasPlugin nameCaveatsDependenciesLicense
Stanford PLY (*.ply)StanfordSceneConverterStanfordSceneConverterminornone
glTF (*.gltf, *.glb)GltfSceneConverterGltfSceneConvertersomenone

Audio importers

To be written.

Fonts

To be written.

Font converters

To be written.

Shader validators, preprocessors, optimizers and linkers

Together with shader converters derived from ShaderTools::AbstractConverter.

FormatGeneric plugin aliasPlugin nameCaveatsDependenciesLicense
GLSLGlslShaderConverterGlslangShaderConverternonebundleableMany
SPIR-VSpirvShaderConverterSpirvToolsShaderConverternonebundleableApache-2.0
SPIR-V assemblySpirvAssemblyShaderConverterSpirvToolsShaderConverternonebundleableApache-2.0

Shader converters

Together with shader validators, preprocessors, optimizers and linkers derived from ShaderTools::AbstractConverter.

FormatGeneric plugin aliasPlugin nameCaveatsDependenciesLicense
GLSL → SPIR-VGlslToSpirvShaderConverterGlslangShaderConverternonebundleableMany
SPIR-V → SPIR-V assemblySpirvToSpirvAssemblyShaderConverterSpirvToolsShaderConverternonebundleableApache-2.0
SPIR-V assembly → SPIR-VSpirvAssemblyToSpirvShaderConverterSpirvToolsShaderConverternonebundleableApache-2.0

Legend

The Caveats column lists known issues and limitations of each plugin, and is color-coded for easier understanding. Note the caveats might get updated over time as features get implemented, bugs fixed or new issues discovered.

  • none means there are no known issues or limitations.
  • minor means the known issues only affect rare corner cases and shouldn't be a problem in practice.
  • some means it has limitations affecting certain use cases. You're encouraged to check the documentation to be sure these don't affect you.
  • severe means it has known bugs and limitations and isn't guaranteed to be usable for generic file import. It might work for your concrete use case, but you're encouraged to pick an alternative, if possible.
  • unknown means there were no documented issues for given file format and there isn't enough practical experience to say how well it works.

The Dependencies column shows what kind of dependencies the plugin relies on, highlighting potential portability issues:

  • none means it's dependency-free, with all its internals following Magnum standards of high test coverage, stability, portability and documentation.
  • bundled means the dependency is usually a single-file 3rd party library that's bundled in the repo, and thus with no extra work needed to get it running. It's also tested on all platforms as Magnum itself, which should mean no portability issues either.
  • bundleable, tiny means the dependency is external to the repository, but it's relatively small and thus has no considerable impact on build times or deployment size. It can be either found externally or embedded as a CMake subproject, which may simplify the building procedure. While no guarantees on its portability are given, small libraries are generally rather portable.
  • bundleable means the dependency is external to the repository and has a significant size that may have impact on build times and deployment size. However it's still possible to embed it as a CMake subproject, which could simplify the building a bit.
  • external, tiny means the dependency is external to the repository, it's relatively small but cannot be (or isn't tested to be) embedded as a CMake subproject, which makes it slightly harder to get running.
  • external means the dependency is external to the repository, has a significant size that may have impact on deployment size, and cannot be (or isn't tested to be) embedded as a CMake subproject. No guarantees on portability whatsoever.

The License column shows the license of the plugin dependency, if there's any. Like with all other 3rd party components, each plugin has a color-coded block showing the license, linking to its text and mentioning requirements coming from the license:

  • light blue marks public domain dependencies, which don't require anything from you in order to use them and put no restrictions on use
  • green marks licenses that make the dependency safe to use in a commercial setting without having to release your source code, usually requiring you to give attribution.
  • yellow marks licenses that require you to either dynamically link to the software to be able to use it in a commercial setting or release your source code as well. Such plugins are safe to use in internal development tools and asset pipelines, but you might want to consider alternatives before bundling them in a deployed commercial product. In some cases there is an alternative commercial licensing option without this requirement.
  • red label marks licenses that unconditionally require you to publish your software together with its source code. Such plugins are only safe to use in internal development tools and asset pipelines, consider alternatives for use in a deployed commercial product. In some cases there is an alternative commercial licensing option without this requirement.