Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.3 KB
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2007 Cyrille Berger <[email protected]>
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
*/

#ifndef TestColorConversionSystem_H
#define TestColorConversionSystem_H

#include <QObject>
#include <QList>
#include <QString>

#include <KoColorConversionSystem.h>

struct ModelDepthProfile {
    ModelDepthProfile(const QString& _model, const QString& _depth, const QString& _profile)
            : model(_model), depth(_depth), profile(_profile) {
    }
    QString model;
    QString depth;
    QString profile;
};

class TestColorConversionSystem : public QObject
{
    Q_OBJECT
public:
    TestColorConversionSystem();
private Q_SLOTS:
    void testConnections();
    void testGoodConnections();
    void testAlphaConnectionPaths();
    void testAlphaConversions();
    void testAlphaU16Conversions();
    void testGrayAConnectionPaths();
    void testGrayAConversions();
    void benchmarkAlphaToRgbConversion();
    void benchmarkRgbToAlphaConversion();

    void testCmykBitnessConversion();

    void testRec2020PQConnectionPaths_data();
    void testRec2020PQConnectionPaths();

private:
    std::vector<KoColorConversionSystem::NodeKey> calcPath(const std::vector<KoColorConversionSystem::NodeKey> &expectedPath, bool skipEngineNodes = true);

private:
    QList< ModelDepthProfile > listModels;
};

#endif