KWin
Loading...
Searching...
No Matches
iccprofile.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#pragma once
7
8#include "core/colorspace.h"
9#include "kwin_export.h"
10
11#include <QMatrix4x4>
12#include <QString>
13#include <memory>
14#include <optional>
15
16typedef void *cmsHPROFILE;
17
18namespace KWin
19{
20
21class ColorTransformation;
22class ColorLUT3D;
23
24class KWIN_EXPORT IccProfile
25{
26public:
28 {
29 std::unique_ptr<ColorTransformation> B;
30 std::optional<QMatrix4x4> matrix;
31 std::unique_ptr<ColorTransformation> M;
32 std::unique_ptr<ColorLUT3D> CLut;
33 std::unique_ptr<ColorTransformation> A;
34 };
35
36 explicit IccProfile(cmsHPROFILE handle, const Colorimetry &colorimetry, BToATagData &&bToATag, const std::shared_ptr<ColorTransformation> &vcgt);
37 explicit IccProfile(cmsHPROFILE handle, const Colorimetry &colorimetry, const std::shared_ptr<ColorTransformation> &inverseEOTF, const std::shared_ptr<ColorTransformation> &vcgt);
39
44 const BToATagData *BtToATag() const;
48 std::shared_ptr<ColorTransformation> inverseEOTF() const;
53 std::shared_ptr<ColorTransformation> vcgt() const;
54 const Colorimetry &colorimetry() const;
55
56 static std::unique_ptr<IccProfile> load(const QString &path);
57
58private:
59 cmsHPROFILE const m_handle;
60 const Colorimetry m_colorimetry;
61 const std::optional<BToATagData> m_bToATag;
62 const std::shared_ptr<ColorTransformation> m_inverseEOTF;
63 const std::shared_ptr<ColorTransformation> m_vcgt;
64};
65
66}
void * cmsHPROFILE
Definition iccprofile.h:16
std::unique_ptr< ColorLUT3D > CLut
Definition iccprofile.h:32
std::unique_ptr< ColorTransformation > A
Definition iccprofile.h:33
std::optional< QMatrix4x4 > matrix
Definition iccprofile.h:30
std::unique_ptr< ColorTransformation > M
Definition iccprofile.h:31
std::unique_ptr< ColorTransformation > B
Definition iccprofile.h:29