Magnum::DebugTools::CompareFileToImage class

File-to-image comparator for Corrade::TestSuite.

A combination of CompareImage and CompareImageFile, which allows to compare an image file to an in-memory image. See their documentation for more information. Example usage:

Image2D expected = loadExpectedImage();
CORRADE_COMPARE_WITH("actual.png", expected,
    (DebugTools::CompareFileToImage{1.5f, 0.01f}));

Constructors, destructors, conversion operators

CompareFileToImage(Float maxThreshold, Float meanThreshold) explicit
Constructor.
CompareFileToImage(PluginManager::Manager<Trade::AbstractImporter>& manager, Float maxThreshold, Float meanThreshold) explicit
Construct with an explicit plugin manager instance.
CompareFileToImage(PluginManager::Manager<Trade::AbstractImporter>& manager) explicit
Construct with an explicit plugin manager instance and implicit thresholds.
CompareFileToImage() explicit
Implicit constructor.

Function documentation

Magnum::DebugTools::CompareFileToImage::CompareFileToImage(Float maxThreshold, Float meanThreshold) explicit

Constructor.

See CompareImageFile::CompareImageFile(Float, Float) for more information.

Magnum::DebugTools::CompareFileToImage::CompareFileToImage(PluginManager::Manager<Trade::AbstractImporter>& manager, Float maxThreshold, Float meanThreshold) explicit

Construct with an explicit plugin manager instance.

See CompareImageFile::CompareImageFile(PluginManager::Manager<Trade::AbstractImporter>&, Float, Float) for more information.

Magnum::DebugTools::CompareFileToImage::CompareFileToImage(PluginManager::Manager<Trade::AbstractImporter>& manager) explicit

Construct with an explicit plugin manager instance and implicit thresholds.

Equivalent to calling CompareFileToImage(PluginManager::Manager<Trade::AbstractImporter>&, Float, Float) with zero values.

Magnum::DebugTools::CompareFileToImage::CompareFileToImage() explicit

Implicit constructor.

Equivalent to calling CompareFileToImage(Float, Float) with zero values.