Krita Source Code Documentation
Loading...
Searching...
No Matches
HdrMetaDataCheck.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef HDRMETADATACHECK_H
7#define HDRMETADATACHECK_H
8
10#include <KoID.h>
11#include <klocalizedstring.h>
12#include <kis_image.h>
13#include <kis_hdr_metadata.h>
14
16{
17public:
18 HdrMetaDataCheck(const QString &id, Level level, const QString &customWarning = QString())
19 : KisExportCheckBase(id, level, customWarning, true)
20 {
21 if (customWarning.isEmpty()) {
22 m_warning = i18nc("image conversion warning", "This image has <b>HDR metadata</b>. HDR metadata cannot be saved to this format.");
23 }
24 }
25
26 bool checkNeeded(KisImageSP image) const override
27 {
29 }
30
31 Level check(KisImageSP /*image*/) const override
32 {
33 return m_level;
34 }
35};
36
38{
39public:
40
42
44
45 KisExportCheckBase *create(KisExportCheckBase::Level level, const QString &customWarning) override
46 {
47 return new HdrMetaDataCheck(id(), level, customWarning);
48 }
49
50 QString id() const override {
51 return "HdrMetaDataCheckFactory";
52 }
53};
54
55#endif // HDRMETADATACHECK_H
QString id() const override
KisExportCheckBase * create(KisExportCheckBase::Level level, const QString &customWarning) override
bool checkNeeded(KisImageSP image) const override
HdrMetaDataCheck(const QString &id, Level level, const QString &customWarning=QString())
Level check(KisImageSP) const override
The KisExportCheckBase class defines the interface of the individual checks of an export filter's cap...
virtual QString id() const
std::optional< KisRelativeContentLightLevelInformation > relativeContentLightLevelInformation() const
relativeContentLightLevelInformation This returns (optionally) a KisRelativeContentLightLevelInformat...
std::optional< double > hdrReferenceWhiteLightLevel() const
HDR Reference White livel.
std::optional< KisColorVolumeInformation > colorVolumeInformation() const
colorVolumeInformation