Magnum::Trade::AbstractImageConverter class

Base for image converter plugins.

Provides functionality for converting images between various formats, compressing them or saving to files.

The interface supports three main kinds of operation, with implementations commonly advertising support for a subset of them via features():

Usage

Image converters are commonly implemented as plugins, which means the concrete converter implementation is loaded and instantiated through a PluginManager::Manager. Then, based on the intent and on what the particular converter supports, convertToFile(), convertToData() or convert() gets called.

As each converter has different requirements and supports different pixel formats, you're expected to perform error handling on the application side — if a conversion fails, you get an empty Containers::Optional / Containers::Array or false and a reason printed to the error output. Everything else (using a feature not implemented in the converter, ...) is treated as a programmer error and will produce the usual assertions.

Saving an image to a file

In the following example an 8-bit RGBA image is saved as a PNG using the AnyImageConverter plugin, together with all needed error handling. In this case we know that AnyImageConverter supports ImageConverterFeature::Convert2DToFile, however in a more general case and especially when dealing with compressed image formats it might be good to check against the reported features() first.

PluginManager::Manager<Trade::AbstractImageConverter> manager;
Containers::Pointer<Trade::AbstractImageConverter> converter =
    manager.loadAndInstantiate("AnyImageConverter");

Image2D image{PixelFormat::RGBA8Unorm, size, };
if(!converter || !converter->convertToFile(image, "image.png"))
    Fatal{} << "Can't save image.png with AnyImageConverter";

See Loading and using plugins for more information about general plugin usage, File format support to compare implementations of common file formats and the list of derived classes for all available image converter plugins.

Saving a set of mip levels

Certain file formats, such as OpenEXR, DDS or ICO, are capable of storing multiple image mip levels in a single file. Each format has a slightly different set of rules for image sizes and their order, in general putting the largest level first and then gradually halving the size should always work. In the following snippet we'll save three mip levels to an EXR file, again using the AnyImageConverter plugin, which will then most likely delegate to OpenExrImageConverter:

PluginManager::Manager<Trade::AbstractImageConverter> manager;
Containers::Pointer<Trade::AbstractImageConverter> converter =
    manager.loadAndInstantiate("AnyImageConverter");

Image2D level0{PixelFormat::RGBA16F, {256, 256}, };
Image2D level1{PixelFormat::RGBA16F, {128, 128}, };
Image2D level2{PixelFormat::RGBA16F, {64, 64}, };

if(!converter || !converter->convertToFile({level0, level1, level2}, "image.exr"))
    Fatal{} << "Can't save image.exr with AnyImageConverter";

Converting image data

In the following snippet we use StbDxtImageConverter to convert the same 8-bit RGBA image as above to a block-compressed one with CompressedPixelFormat::Bc3RGBAUnorm. While AnyImageConverter can detect the desired format when writing to a file and act accordingly, here it would have no way to know what we want and so we request the concrete plugin name directly. Here we again know that StbDxtImageConverter gives us back a compressed image and so we can put in just a sanity assert, but in the general case it's converter-dependent and may even rely on configuration options set for the plugin.

PluginManager::Manager<Trade::AbstractImageConverter> manager;
Containers::Pointer<Trade::AbstractImageConverter> converter =
    manager.loadAndInstantiate("StbDxtImageConverter");

Containers::Optional<Trade::ImageData2D> compressed;
if(!converter || !(compressed = converter->convert(image)))
    Fatal{} << "Can't convert the image with StbDxtImageConverter";
CORRADE_INTERNAL_ASSERT(compressed->isCompressed());

Commonly, when operating directly on the image data, each plugin exposes a set of configuration options to specify what actually gets done and how, and the default setup may not even do anything. See Editing plugin-specific configuration for details and a usage example.

Data dependency

The instances returned from various functions by design have no dependency on the converter instance and neither on the dynamic plugin module. In other words, you don't need to keep the converter instance (or the plugin manager instance) around in order to have the *Data instances valid. Moreover, all returned Containers::Array instances and Containers::Array instances returned through ImageData are only allowed to have default deleters — this is to avoid potential dangling function pointer calls when destructing such instances after the plugin module has been unloaded.

Subclassing

The plugin needs to implement the doFeatures() function and one or more of doConvert(), doConvertToData() or doConvertToFile() functions based on what features are supported.

You don't need to do most of the redundant sanity checks, these things are checked by the implementation:

Derived classes

class AnyImageConverter
Any image converter plugin.
class BasisImageConverter new in 2019.10
Basis Universal image converter plugin.
class JpegImageConverter
JPEG image converter plugin.
class KtxImageConverter new in Git master
KTX2 image converter plugin.
class MiniExrImageConverter
OpenEXR image converter plugin using miniexr.
class OpenExrImageConverter new in Git master
OpenEXR image converter plugin.
class PngImageConverter
PNG image converter plugin.
class StbDxtImageConverter new in Git master
BC1/BC3 compressor using stb_dxt.
class StbImageConverter
Image converter plugin using stb_image_write.
class TgaImageConverter
TGA image converter plugin.

Public types

using Feature = ImageConverterFeature deprecated in 2020.06
Features supported by an image converter.
using Features = ImageConverterFeatures deprecated in 2020.06
Features supported by an image converter.

Public static functions

static auto pluginInterface() -> std::string
Plugin interface.
static auto pluginSearchPaths() -> std::vector<std::string>
Plugin search paths.

Constructors, destructors, conversion operators

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

Public functions

auto features() const -> ImageConverterFeatures
Features supported by this converter.
auto flags() const -> ImageConverterFlags new in 2020.06
Converter flags.
void setFlags(ImageConverterFlags flags) new in 2020.06
Set converter flags.
void addFlags(ImageConverterFlags flags) new in Git master
Add converter flags.
void clearFlags(ImageConverterFlags flags) new in Git master
Clear converter flags.
auto convert(const ImageView1D& image) -> Containers::Optional<ImageData1D> new in Git master
Convert a 1D image.
auto convert(const ImageView2D& image) -> Containers::Optional<ImageData2D> new in Git master
Convert a 2D image.
auto exportToImage(const ImageView2D& image) -> Containers::Optional<Image2D> deprecated in Git master
Convert a 2D image.
auto exportToCompressedImage(const ImageView2D& image) -> Containers::Optional<CompressedImage2D> deprecated in Git master
Convert a 2D image to compressed format.
auto convert(const ImageView3D& image) -> Containers::Optional<ImageData3D> new in Git master
Convert a 3D image.
auto convert(const CompressedImageView1D& image) -> Containers::Optional<ImageData1D> new in Git master
Convert a compressed 1D image.
auto convert(const CompressedImageView2D& image) -> Containers::Optional<ImageData2D> new in Git master
Convert a compressed 2D image.
auto convert(const CompressedImageView3D& image) -> Containers::Optional<ImageData3D> new in Git master
Convert a compressed 3D image.
auto convert(const ImageData1D& image) -> Containers::Optional<ImageData1D> new in Git master
Convert a 1D image data.
auto convert(const ImageData2D& image) -> Containers::Optional<ImageData2D> new in Git master
Convert a 2D image data.
auto convert(const ImageData3D& image) -> Containers::Optional<ImageData3D> new in Git master
Convert a 3D image data.
auto convertToData(const ImageView1D& image) -> Containers::Array<char> new in Git master
Convert a 1D image to a raw data.
auto convertToData(const ImageView2D& image) -> Containers::Array<char> new in Git master
Convert a 2D image to a raw data.
auto exportToData(const ImageView2D& image) -> Containers::Array<char> deprecated in Git master
Convert a 2D image to a raw data.
auto convertToData(const ImageView3D& image) -> Containers::Array<char> new in Git master
Convert a 3D image to a raw data.
auto convertToData(const CompressedImageView1D& image) -> Containers::Array<char> new in Git master
Convert a compressed 1D image to a raw data.
auto convertToData(const CompressedImageView2D& image) -> Containers::Array<char> new in Git master
Convert a compressed 2D image to a raw data.
auto exportToData(const CompressedImageView2D& image) -> Containers::Array<char> deprecated in Git master
Convert a compressed 2D image to a raw data.
auto convertToData(const CompressedImageView3D& image) -> Containers::Array<char> new in Git master
Convert a compressed 3D image to a raw data.
auto convertToData(const ImageData1D& image) -> Containers::Array<char> new in Git master
Convert a 1D image data to a raw data.
auto convertToData(const ImageData2D& image) -> Containers::Array<char> new in Git master
Convert a 2D image data to a raw data.
auto exportToData(const ImageData2D& image) -> Containers::Array<char> deprecated in Git master
Convert a 2D image data to a raw data.
auto convertToData(const ImageData3D& image) -> Containers::Array<char> new in Git master
Convert a 3D image data to a raw data.
auto convertToData(Containers::ArrayView<const ImageView1D> imageLevels) -> Containers::Array<char> new in Git master
Convert a set of 1D image levels to a raw data.
auto convertToData(std::initializer_list<ImageView1D> imageLevels) -> Containers::Array<char>
auto convertToData(Containers::ArrayView<const ImageView2D> imageLevels) -> Containers::Array<char> new in Git master
Convert a set of 2D image levels to a raw data.
auto convertToData(std::initializer_list<ImageView2D> imageLevels) -> Containers::Array<char>
auto convertToData(Containers::ArrayView<const ImageView3D> imageLevels) -> Containers::Array<char> new in Git master
Convert a set of 3D image levels to a raw data.
auto convertToData(std::initializer_list<ImageView3D> imageLevels) -> Containers::Array<char>
auto convertToData(Containers::ArrayView<const CompressedImageView1D> imageLevels) -> Containers::Array<char> new in Git master
Convert a set of compressed 1D image levels to a raw data.
auto convertToData(std::initializer_list<CompressedImageView1D> imageLevels) -> Containers::Array<char>
auto convertToData(Containers::ArrayView<const CompressedImageView2D> imageLevels) -> Containers::Array<char> new in Git master
Convert a set of compressed 2D image levels to a raw data.
auto convertToData(std::initializer_list<CompressedImageView2D> imageLevels) -> Containers::Array<char>
auto convertToData(Containers::ArrayView<const CompressedImageView3D> images) -> Containers::Array<char> new in Git master
Convert a set of compressed 3D image levels to a raw data.
auto convertToData(std::initializer_list<CompressedImageView3D> images) -> Containers::Array<char>
auto convertToFile(const ImageView1D& image, Containers::StringView filename) -> bool new in Git master
Convert a 1D image to a file.
auto convertToFile(const ImageView2D& image, Containers::StringView filename) -> bool new in Git master
Convert a 2D image to a file.
auto exportToFile(const ImageView2D& image, const std::string& filename) -> bool deprecated in Git master
Convert a 2D image to a file.
auto convertToFile(const ImageView3D& image, Containers::StringView filename) -> bool new in Git master
Convert a 3D image to a file.
auto convertToFile(const CompressedImageView1D& image, Containers::StringView filename) -> bool new in Git master
Convert a compressed 1D image to a file.
auto convertToFile(const CompressedImageView2D& image, Containers::StringView filename) -> bool new in Git master
Convert a compressed 2D image to a file.
auto exportToFile(const CompressedImageView2D& image, const std::string& filename) -> bool deprecated in Git master
Convert a compressed 2D image to a file.
auto convertToFile(const CompressedImageView3D& image, Containers::StringView filename) -> bool new in Git master
Convert a compressed 3D image to a file.
auto convertToFile(const ImageData1D& image, Containers::StringView filename) -> bool new in Git master
Convert a 1D image data to a file.
auto convertToFile(const ImageData2D& image, Containers::StringView filename) -> bool new in Git master
Convert a 2D image data to a file.
auto exportToFile(const ImageData2D& image, const std::string& filename) -> bool deprecated in Git master
Convert a 2D image data to a file.
auto convertToFile(const ImageData3D& image, Containers::StringView filename) -> bool new in Git master
Convert a 3D image data to a file.
auto convertToFile(Containers::ArrayView<const ImageView1D> imageLevels, Containers::StringView filename) -> bool new in Git master
Convert a set of 1D image levels to a file.
auto convertToFile(std::initializer_list<ImageView1D> imageLevels, Containers::StringView filename) -> bool
auto convertToFile(Containers::ArrayView<const ImageView2D> imageLevels, Containers::StringView filename) -> bool new in Git master
Convert a set of 2D image levels to a file.
auto convertToFile(std::initializer_list<ImageView2D> imageLevels, Containers::StringView filename) -> bool
auto convertToFile(Containers::ArrayView<const ImageView3D> imageLevels, Containers::StringView filename) -> bool new in Git master
Convert a set of 3D image levels to a file.
auto convertToFile(std::initializer_list<ImageView3D> imageLevels, Containers::StringView filename) -> bool
auto convertToFile(Containers::ArrayView<const CompressedImageView1D> imageLevels, Containers::StringView filename) -> bool new in Git master
Convert a set of compressed 1D image levels to a file.
auto convertToFile(std::initializer_list<CompressedImageView1D> imageLevels, Containers::StringView filename) -> bool
auto convertToFile(Containers::ArrayView<const CompressedImageView2D> imageLevels, Containers::StringView filename) -> bool new in Git master
Convert a set of compressed 2D image levels to a file.
auto convertToFile(std::initializer_list<CompressedImageView2D> imageLevels, Containers::StringView filename) -> bool
auto convertToFile(Containers::ArrayView<const CompressedImageView3D> imageLevels, Containers::StringView filename) -> bool new in Git master
Convert a set of compressed 3D image levels to a file.
auto convertToFile(std::initializer_list<CompressedImageView3D> imageLevels, Containers::StringView filename) -> bool

Protected functions

auto doConvertToFile(const ImageView1D& image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(const ImageView1D&, Containers::StringView)
auto doConvertToFile(const ImageView2D& image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(const ImageView2D&, Containers::StringView)
auto doConvertToFile(const ImageView3D& image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(const ImageView3D&, Containers::StringView)
auto doConvertToFile(const CompressedImageView1D& image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(const CompressedImageView1D&, Containers::StringView)
auto doConvertToFile(const CompressedImageView2D& image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(const CompressedImageView2D&, Containers::StringView)
auto doConvertToFile(const CompressedImageView3D& image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(const CompressedImageView3D&, Containers::StringView)
auto doConvertToFile(Containers::ArrayView<const ImageView1D> imageLevels, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(Containers::ArrayView<const ImageView1D>, Containers::StringView)
auto doConvertToFile(Containers::ArrayView<const ImageView2D> imageLevels, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(Containers::ArrayView<const ImageView2D>, Containers::StringView)
auto doConvertToFile(Containers::ArrayView<const ImageView3D> imageLevels, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(Containers::ArrayView<const ImageView3D>, Containers::StringView)
auto doConvertToFile(Containers::ArrayView<const CompressedImageView1D> image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(Containers::ArrayView<const CompressedImageView1D>, Containers::StringView)
auto doConvertToFile(Containers::ArrayView<const CompressedImageView2D> image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(Containers::ArrayView<const CompressedImageView2D>, Containers::StringView)
auto doConvertToFile(Containers::ArrayView<const CompressedImageView3D> image, Containers::StringView filename) -> bool virtual new in Git master
Implementation for convertToFile(Containers::ArrayView<const CompressedImageView3D>, Containers::StringView)

Private functions

auto doFeatures() const -> ImageConverterFeatures pure virtual
Implementation for features()
void doSetFlags(ImageConverterFlags flags) virtual new in 2020.06
Implementation for setFlags()
auto doConvert(const ImageView1D& image) -> Containers::Optional<ImageData1D> virtual new in Git master
Implementation for convert(const ImageView1D&)
auto doConvert(const ImageView2D& image) -> Containers::Optional<ImageData2D> virtual new in Git master
Implementation for convert(const ImageView2D&)
auto doConvert(const ImageView3D& image) -> Containers::Optional<ImageData3D> virtual new in Git master
Implementation for convert(const ImageView3D&)
auto doConvert(const CompressedImageView1D& image) -> Containers::Optional<ImageData1D> virtual new in Git master
Implementation for convert(const CompressedImageView1D&)
auto doConvert(const CompressedImageView2D& image) -> Containers::Optional<ImageData2D> virtual new in Git master
Implementation for convert(const CompressedImageView2D&)
auto doConvert(const CompressedImageView3D& image) -> Containers::Optional<ImageData3D> virtual new in Git master
Implementation for convert(const CompressedImageView3D&)
auto doConvertToData(const ImageView1D& image) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(const ImageView1D&)
auto doConvertToData(const ImageView2D& image) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(const ImageView2D&)
auto doConvertToData(const ImageView3D& image) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(const ImageView3D&)
auto doConvertToData(const CompressedImageView1D& image) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(const CompressedImageView1D&)
auto doConvertToData(const CompressedImageView2D& image) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(const CompressedImageView2D&)
auto doConvertToData(const CompressedImageView3D& image) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(const CompressedImageView3D&)
auto doConvertToData(Containers::ArrayView<const ImageView1D> imageLevels) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(Containers::ArrayView<const ImageView1D>)
auto doConvertToData(Containers::ArrayView<const ImageView2D> imageLevels) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(Containers::ArrayView<const ImageView2D>)
auto doConvertToData(Containers::ArrayView<const ImageView3D> imageLevels) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(Containers::ArrayView<const ImageView3D>)
auto doConvertToData(Containers::ArrayView<const CompressedImageView1D> imageLevels) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(Containers::ArrayView<const CompressedImageView1D>)
auto doConvertToData(Containers::ArrayView<const CompressedImageView2D> imageLevels) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(Containers::ArrayView<const CompressedImageView2D>)
auto doConvertToData(Containers::ArrayView<const CompressedImageView3D> imageLevels) -> Containers::Array<char> virtual new in Git master
Implementation for convertToData(Containers::ArrayView<const CompressedImageView3D>)

Typedef documentation

typedef ImageConverterFeature Magnum::Trade::AbstractImageConverter::Feature

Features supported by an image converter.

typedef ImageConverterFeatures Magnum::Trade::AbstractImageConverter::Features

Features supported by an image converter.

Function documentation

static std::string Magnum::Trade::AbstractImageConverter::pluginInterface()

Plugin interface.

"cz.mosra.magnum.Trade.AbstractImageConverter/0.3.1"

static std::vector<std::string> Magnum::Trade::AbstractImageConverter::pluginSearchPaths()

Plugin search paths.

Looks into magnum/imageconverters/ or magnum-d/imageconverters/ next to the dynamic Trade library, next to the executable and elsewhere according to the rules documented in Corrade::PluginManager::implicitPluginSearchPaths(). The search directory can be also hardcoded using the MAGNUM_PLUGINS_DIR CMake variables, see Downloading and building for more information.

Not defined on platforms without dynamic plugin support.

void Magnum::Trade::AbstractImageConverter::setFlags(ImageConverterFlags flags) new in 2020.06

Set converter flags.

Some flags can be set only if the converter supports particular features, see documentation of each ImageConverterFlag for more information. By default no flags are set. To avoid clearing potential future default flags by accident, prefer to use addFlags() and clearFlags() instead.

Corresponds to the -v / --verbose option in magnum-imageconverter.

void Magnum::Trade::AbstractImageConverter::addFlags(ImageConverterFlags flags) new in Git master

Add converter flags.

Calls setFlags() with the existing flags ORed with flags. Useful for preserving the defaults.

void Magnum::Trade::AbstractImageConverter::clearFlags(ImageConverterFlags flags) new in Git master

Clear converter flags.

Calls setFlags() with the existing flags ANDed with inverse of flags. Useful for removing default flags.

Containers::Optional<ImageData1D> Magnum::Trade::AbstractImageConverter::convert(const ImageView1D& image) new in Git master

Convert a 1D image.

Available only if ImageConverterFeature::Convert1D is supported. Returns converted image on success, Containers::NullOpt otherwise. The implementation is allowed to return both a compressed an an uncompressed image, see documentation of a particular converter for more information.

Containers::Optional<ImageData2D> Magnum::Trade::AbstractImageConverter::convert(const ImageView2D& image) new in Git master

Convert a 2D image.

Available only if ImageConverterFeature::Convert2D is supported. Returns converted image on success, Containers::NullOpt otherwise. The implementation is allowed to return both a compressed an an uncompressed image, see documentation of a particular converter for more information.

Containers::Optional<Image2D> Magnum::Trade::AbstractImageConverter::exportToImage(const ImageView2D& image)

Convert a 2D image.

Containers::Optional<CompressedImage2D> Magnum::Trade::AbstractImageConverter::exportToCompressedImage(const ImageView2D& image)

Convert a 2D image to compressed format.

Containers::Optional<ImageData3D> Magnum::Trade::AbstractImageConverter::convert(const ImageView3D& image) new in Git master

Convert a 3D image.

Available only if ImageConverterFeature::Convert3D is supported. Returns converted image on success, Containers::NullOpt otherwise. The implementation is allowed to return both a compressed an an uncompressed image, see documentation of a particular converter for more information.

Containers::Optional<ImageData1D> Magnum::Trade::AbstractImageConverter::convert(const CompressedImageView1D& image) new in Git master

Convert a compressed 1D image.

Available only if ImageConverterFeature::ConvertCompressed1D is supported. Returns converted image on success, Containers::NullOpt otherwise. The implementation is allowed to return both a compressed an an uncompressed image, see documentation of a particular converter for more information.

Containers::Optional<ImageData2D> Magnum::Trade::AbstractImageConverter::convert(const CompressedImageView2D& image) new in Git master

Convert a compressed 2D image.

Available only if ImageConverterFeature::ConvertCompressed2D is supported. Returns converted image on success, Containers::NullOpt otherwise. The implementation is allowed to return both a compressed an an uncompressed image, see documentation of a particular converter for more information.

Containers::Optional<ImageData3D> Magnum::Trade::AbstractImageConverter::convert(const CompressedImageView3D& image) new in Git master

Convert a compressed 3D image.

Available only if ImageConverterFeature::ConvertCompressed3D is supported. Returns converted image on success, Containers::NullOpt otherwise. The implementation is allowed to return both a compressed an an uncompressed image, see documentation of a particular converter for more information.

Containers::Optional<ImageData1D> Magnum::Trade::AbstractImageConverter::convert(const ImageData1D& image) new in Git master

Convert a 1D image data.

Based on whether the image is compressed or not, calls either convert(const ImageView1D&) or convert(const CompressedImageView1D&). See documentation of these two functions for details.

This overload is not provided for multi-level conversion as the view list creation can be done more optimally on the application side.

Containers::Optional<ImageData2D> Magnum::Trade::AbstractImageConverter::convert(const ImageData2D& image) new in Git master

Convert a 2D image data.

Based on whether the image is compressed or not, calls either convert(const ImageView2D&) or convert(const CompressedImageView2D&). See documentation of these two functions for details.

This overload is not provided for multi-level conversion as the view list creation can be done more optimally on the application side.

Containers::Optional<ImageData3D> Magnum::Trade::AbstractImageConverter::convert(const ImageData3D& image) new in Git master

Convert a 3D image data.

Based on whether the image is compressed or not, calls either convert(const ImageView3D&) or convert(const CompressedImageView3D&). See documentation of these two functions for details.

This overload is not provided for multi-level conversion as the view list creation can be done more optimally on the application side.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const ImageView1D& image) new in Git master

Convert a 1D image to a raw data.

Available only if ImageConverterFeature::Convert1DToData or ImageConverterFeature::ConvertLevels1DToData is supported. The image view is expected to not be nullptr and to have a non-zero size. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const ImageView2D& image) new in Git master

Convert a 2D image to a raw data.

Available only if ImageConverterFeature::Convert2DToData or ImageConverterFeature::ConvertLevels2DToData is supported. The image view is expected to not be nullptr and to have a non-zero size in all dimensions. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::exportToData(const ImageView2D& image)

Convert a 2D image to a raw data.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const ImageView3D& image) new in Git master

Convert a 3D image to a raw data.

Available only if ImageConverterFeature::Convert3DToData or ImageConverterFeature::ConvertLevels3DToData is supported. The image view is expected to not be nullptr and to have a non-zero size in all dimensions. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const CompressedImageView1D& image) new in Git master

Convert a compressed 1D image to a raw data.

Available only if ImageConverterFeature::ConvertCompressed1DToData or ImageConverterFeature::ConvertCompressedLevels1DToData is supported. The image view is expected to not be nullptr and to have a non-zero size. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const CompressedImageView2D& image) new in Git master

Convert a compressed 2D image to a raw data.

Available only if ImageConverterFeature::ConvertCompressed2DToData or ImageConverterFeature::ConvertCompressedLevels2DToData is supported. The image view is expected to not be nullptr and to have a non-zero size in all dimensions. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::exportToData(const CompressedImageView2D& image)

Convert a compressed 2D image to a raw data.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const CompressedImageView3D& image) new in Git master

Convert a compressed 3D image to a raw data.

Available only if ImageConverterFeature::ConvertCompressed3DToData or ImageConverterFeature::ConvertCompressedLevels3DToData is supported. The image view is expected to not be nullptr and to have a non-zero size in all dimensions. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const ImageData1D& image) new in Git master

Convert a 1D image data to a raw data.

Based on whether the image is compressed or not, calls either convertToData(const ImageView1D&) or convertToData(const CompressedImageView1D&). See documentation of these two functions for details.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const ImageData2D& image) new in Git master

Convert a 2D image data to a raw data.

Based on whether the image is compressed or not, calls either convertToData(const ImageView2D&) or convertToData(const CompressedImageView2D&). See documentation of these two functions for details.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::exportToData(const ImageData2D& image)

Convert a 2D image data to a raw data.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(const ImageData3D& image) new in Git master

Convert a 3D image data to a raw data.

Based on whether the image is compressed or not, calls either convertToData(const ImageView3D&) or convertToData(const CompressedImageView3D&). See documentation of these two functions for details.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(Containers::ArrayView<const ImageView1D> imageLevels) new in Git master

Convert a set of 1D image levels to a raw data.

Available only if ImageConverterFeature::ConvertLevels1DToData is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size, and all of them sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(std::initializer_list<ImageView1D> imageLevels)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(Containers::ArrayView<const ImageView2D> imageLevels) new in Git master

Convert a set of 2D image levels to a raw data.

Available only if ImageConverterFeature::ConvertLevels2DToData is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size in all dimensions, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(std::initializer_list<ImageView2D> imageLevels)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(Containers::ArrayView<const ImageView3D> imageLevels) new in Git master

Convert a set of 3D image levels to a raw data.

Available only if ImageConverterFeature::ConvertLevels3DToData is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size in all dimensions, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(std::initializer_list<ImageView3D> imageLevels)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(Containers::ArrayView<const CompressedImageView1D> imageLevels) new in Git master

Convert a set of compressed 1D image levels to a raw data.

Available only if ImageConverterFeature::ConvertCompressedLevels1DToData is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(std::initializer_list<CompressedImageView1D> imageLevels)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(Containers::ArrayView<const CompressedImageView2D> imageLevels) new in Git master

Convert a set of compressed 2D image levels to a raw data.

Available only if ImageConverterFeature::ConvertCompressedLevels2DToData is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size in all dimensions, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(std::initializer_list<CompressedImageView2D> imageLevels)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(Containers::ArrayView<const CompressedImageView3D> images) new in Git master

Convert a set of compressed 3D image levels to a raw data.

Available only if ImageConverterFeature::ConvertCompressedLevels3DToData is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size in all dimensions, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns data on success, nullptr otherwise.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::convertToData(std::initializer_list<CompressedImageView3D> images)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const ImageView1D& image, Containers::StringView filename) new in Git master

Convert a 1D image to a file.

Available only if ImageConverterFeature::Convert1DToFile or ImageConverterFeature::Convert1DToData is supported. The image view is expected to not be nullptr and to have a non-zero size. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const ImageView2D& image, Containers::StringView filename) new in Git master

Convert a 2D image to a file.

Available only if ImageConverterFeature::Convert2DToFile or ImageConverterFeature::Convert2DToData is supported. The image view is expected to not be nullptr and to have a non-zero size in all dimensions. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::exportToFile(const ImageView2D& image, const std::string& filename)

Convert a 2D image to a file.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const ImageView3D& image, Containers::StringView filename) new in Git master

Convert a 3D image to a file.

Available only if ImageConverterFeature::Convert3DToFile or ImageConverterFeature::Convert3DToData is supported. The image view is expected to not be nullptr and to have a non-zero size. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const CompressedImageView1D& image, Containers::StringView filename) new in Git master

Convert a compressed 1D image to a file.

Available only if ImageConverterFeature::ConvertCompressed1DToFile or ImageConverterFeature::ConvertCompressed1DToData is supported. The image view is expected to not be nullptr and to have a non-zero size in all dimensions. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const CompressedImageView2D& image, Containers::StringView filename) new in Git master

Convert a compressed 2D image to a file.

Available only if ImageConverterFeature::ConvertCompressed2DToFile or ImageConverterFeature::ConvertCompressed2DToData is supported. The image view is expected to not be nullptr and to have a non-zero size in all dimensions. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::exportToFile(const CompressedImageView2D& image, const std::string& filename)

Convert a compressed 2D image to a file.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const CompressedImageView3D& image, Containers::StringView filename) new in Git master

Convert a compressed 3D image to a file.

Available only if ImageConverterFeature::ConvertCompressed3DToFile or ImageConverterFeature::ConvertCompressed3DToData is supported. The image view is expected to not be nullptr and to have a non-zero size in all dimensions. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const ImageData1D& image, Containers::StringView filename) new in Git master

Convert a 1D image data to a file.

Based on whether the image is compressed or not, calls either convertToFile(const ImageView1D&, Containers::StringView) or convertToFile(const CompressedImageView1D&, Containers::StringView). See documentation of these two functions for details.

This overload is not provided for multi-level conversion as the view list creation can be done more optimally on the application side.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const ImageData2D& image, Containers::StringView filename) new in Git master

Convert a 2D image data to a file.

Based on whether the image is compressed or not, calls either convertToFile(const ImageView2D&, Containers::StringView) or convertToFile(const CompressedImageView2D&, Containers::StringView). See documentation of these two functions for details.

This overload is not provided for multi-level conversion as the view list creation can be done more optimally on the application side.

bool Magnum::Trade::AbstractImageConverter::exportToFile(const ImageData2D& image, const std::string& filename)

Convert a 2D image data to a file.

bool Magnum::Trade::AbstractImageConverter::convertToFile(const ImageData3D& image, Containers::StringView filename) new in Git master

Convert a 3D image data to a file.

Based on whether the image is compressed or not, calls either convertToFile(const ImageView3D&, Containers::StringView) or convertToFile(const CompressedImageView3D&, Containers::StringView). See documentation of these two functions for details.

This overload is not provided for multi-level conversion as the view list creation can be done more optimally on the application side.

bool Magnum::Trade::AbstractImageConverter::convertToFile(Containers::ArrayView<const ImageView1D> imageLevels, Containers::StringView filename) new in Git master

Convert a set of 1D image levels to a file.

Available only if ImageConverterFeature::ConvertLevels1DToFile is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(std::initializer_list<ImageView1D> imageLevels, Containers::StringView filename)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool Magnum::Trade::AbstractImageConverter::convertToFile(Containers::ArrayView<const ImageView2D> imageLevels, Containers::StringView filename) new in Git master

Convert a set of 2D image levels to a file.

Available only if ImageConverterFeature::ConvertLevels2DToFile is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size in all dimensions, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(std::initializer_list<ImageView2D> imageLevels, Containers::StringView filename)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool Magnum::Trade::AbstractImageConverter::convertToFile(Containers::ArrayView<const ImageView3D> imageLevels, Containers::StringView filename) new in Git master

Convert a set of 3D image levels to a file.

Available only if ImageConverterFeature::ConvertLevels3DToFile is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size in all dimensions, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(std::initializer_list<ImageView3D> imageLevels, Containers::StringView filename)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool Magnum::Trade::AbstractImageConverter::convertToFile(Containers::ArrayView<const CompressedImageView1D> imageLevels, Containers::StringView filename) new in Git master

Convert a set of compressed 1D image levels to a file.

Available only if ImageConverterFeature::ConvertCompressedLevels1DToFile is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(std::initializer_list<CompressedImageView1D> imageLevels, Containers::StringView filename)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool Magnum::Trade::AbstractImageConverter::convertToFile(Containers::ArrayView<const CompressedImageView2D> imageLevels, Containers::StringView filename) new in Git master

Convert a set of compressed 2D image levels to a file.

Available only if ImageConverterFeature::ConvertCompressedLevels2DToFile is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size in all dimensions, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(std::initializer_list<CompressedImageView2D> imageLevels, Containers::StringView filename)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool Magnum::Trade::AbstractImageConverter::convertToFile(Containers::ArrayView<const CompressedImageView3D> imageLevels, Containers::StringView filename) new in Git master

Convert a set of compressed 3D image levels to a file.

Available only if ImageConverterFeature::ConvertCompressedLevels3DToFile is supported. The function expects at least one image to be passed, with each view expected to not be nullptr, to have a non-zero size in all dimensions, and all views sharing the same pixel format. Note that certain converters may impose additional size and order restrictions on the images, see documentation of a particular plugin for more information. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImageConverter::convertToFile(std::initializer_list<CompressedImageView3D> imageLevels, Containers::StringView filename)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(const ImageView1D& image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(const ImageView1D&, Containers::StringView)

If ImageConverterFeature::ConvertLevels1DToFile is supported, default implementation calls doConvertToFile(Containers::ArrayView<const ImageView1D>, Containers::StringView) with just the single image. Otherwise, if ImageConverterFeature::Convert1DToData is supported, default implementation calls doConvertToData(const ImageView1D&) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(const ImageView2D& image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(const ImageView2D&, Containers::StringView)

If ImageConverterFeature::ConvertLevels2DToFile is supported, default implementation calls doConvertToFile(Containers::ArrayView<const ImageView2D>, Containers::StringView) with just the single image. Otherwise, if ImageConverterFeature::Convert2DToData is supported, default implementation calls doConvertToData(const ImageView2D&) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(const ImageView3D& image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(const ImageView3D&, Containers::StringView)

If ImageConverterFeature::ConvertLevels3DToFile is supported, default implementation calls doConvertToFile(Containers::ArrayView<const ImageView3D>, Containers::StringView) with just the single image. Otherwise, if ImageConverterFeature::Convert3DToData is supported, default implementation calls doConvertToData(const ImageView3D&) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(const CompressedImageView1D& image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(const CompressedImageView1D&, Containers::StringView)

If ImageConverterFeature::ConvertCompressedLevels1DToFile is supported, default implementation calls doConvertToFile(Containers::ArrayView<const CompressedImageView1D>, Containers::StringView) with just the single image. Otherwise, if ImageConverterFeature::ConvertCompressed1DToData is supported, default implementation calls doConvertToData(const CompressedImageView1D&) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(const CompressedImageView2D& image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(const CompressedImageView2D&, Containers::StringView)

If ImageConverterFeature::ConvertCompressedLevels2DToFile is supported, default implementation calls doConvertToFile(Containers::ArrayView<const CompressedImageView2D>, Containers::StringView) with just the single image. Otherwise, if ImageConverterFeature::ConvertCompressed2DToData is supported, default implementation calls doConvertToData(const CompressedImageView2D&) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(const CompressedImageView3D& image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(const CompressedImageView3D&, Containers::StringView)

If ImageConverterFeature::ConvertCompressedLevels3DToFile is supported, default implementation calls doConvertToFile(Containers::ArrayView<const CompressedImageView3D>, Containers::StringView) with just the single image. Otherwise, if ImageConverterFeature::ConvertCompressed3DToData is supported, default implementation calls doConvertToData(const CompressedImageView3D&) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(Containers::ArrayView<const ImageView1D> imageLevels, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(Containers::ArrayView<const ImageView1D>, Containers::StringView)

If ImageConverterFeature::ConvertLevels1DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const ImageView1D>) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(Containers::ArrayView<const ImageView2D> imageLevels, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(Containers::ArrayView<const ImageView2D>, Containers::StringView)

If ImageConverterFeature::ConvertLevels1DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const ImageView2D>) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(Containers::ArrayView<const ImageView3D> imageLevels, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(Containers::ArrayView<const ImageView3D>, Containers::StringView)

If ImageConverterFeature::ConvertLevels1DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const ImageView3D>) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(Containers::ArrayView<const CompressedImageView1D> image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(Containers::ArrayView<const CompressedImageView1D>, Containers::StringView)

If ImageConverterFeature::ConvertCompressedLevels1DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const CompressedImageView1D>) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(Containers::ArrayView<const CompressedImageView2D> image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(Containers::ArrayView<const CompressedImageView2D>, Containers::StringView)

If ImageConverterFeature::ConvertCompressedLevels2DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const CompressedImageView2D>) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

bool Magnum::Trade::AbstractImageConverter::doConvertToFile(Containers::ArrayView<const CompressedImageView3D> image, Containers::StringView filename) virtual protected new in Git master

Implementation for convertToFile(Containers::ArrayView<const CompressedImageView3D>, Containers::StringView)

If ImageConverterFeature::ConvertCompressedLevels3DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const CompressedImageView3D>) and saves the result to given file. It is allowed to call this function from your doConvertToFile() implementation, for example when you only need to do format detection based on file extension.

void Magnum::Trade::AbstractImageConverter::doSetFlags(ImageConverterFlags flags) virtual private new in 2020.06

Implementation for setFlags()

Useful when the converter needs to modify some internal state on flag setup. Default implementation does nothing and this function doesn't need to be implemented — the flags are available through flags().

To reduce the amount of error checking on user side, this function isn't expected to fail — if a flag combination is invalid / unsuported, error reporting should be delayed to various conversion functions, where the user is expected to do error handling anyway.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::doConvertToData(const ImageView1D& image) virtual private new in Git master

Implementation for convertToData(const ImageView1D&)

If ImageConverterFeature::ConvertLevels1DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const ImageView1D>) with just the single image and propagates the result back.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::doConvertToData(const ImageView2D& image) virtual private new in Git master

Implementation for convertToData(const ImageView2D&)

If ImageConverterFeature::ConvertLevels2DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const ImageView2D>) with just the single image and propagates the result back.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::doConvertToData(const ImageView3D& image) virtual private new in Git master

Implementation for convertToData(const ImageView3D&)

If ImageConverterFeature::ConvertLevels3DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const ImageView3D>) with just the single image and propagates the result back.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::doConvertToData(const CompressedImageView1D& image) virtual private new in Git master

Implementation for convertToData(const CompressedImageView1D&)

If ImageConverterFeature::ConvertCompressedLevels1DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const CompressedImageView1D>) with just the single image and propagates the result back.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::doConvertToData(const CompressedImageView2D& image) virtual private new in Git master

Implementation for convertToData(const CompressedImageView2D&)

If ImageConverterFeature::ConvertCompressedLevels2DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const CompressedImageView2D>) with just the single image and propagates the result back.

Containers::Array<char> Magnum::Trade::AbstractImageConverter::doConvertToData(const CompressedImageView3D& image) virtual private new in Git master

Implementation for convertToData(const CompressedImageView3D&)

If ImageConverterFeature::ConvertCompressedLevels3DToData is supported, default implementation calls doConvertToData(Containers::ArrayView<const CompressedImageView3D>) with just the single image and propagates the result back.