Krita Source Code Documentation
Loading...
Searching...
No Matches
KisChangeImageHdrMetadataCommand.cpp
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: GPL-2.0-or-later
5 */
7#include "kis_command_ids.h"
8#include <kis_image.h>
9
11 KisImageWSP image,
12 std::optional<double> referenceWhite,
13 std::optional<KisRelativeContentLightLevelInformation> clli,
14 std::optional<KisColorVolumeInformation> cvi,
15 KUndo2Command *parent)
16 : KUndo2Command(kundo2_i18n("Set HDR Metadata"), parent)
17 , m_image(image)
18 , m_referenceWhite(referenceWhite)
19 , m_clli(clli)
20 , m_cvi(cvi)
21{
23 if (img) {
27 }
28}
29
39
49
54
56{
57 const KisChangeImageHdrMetadataCommand *other = dynamic_cast<const KisChangeImageHdrMetadataCommand *>(otherCommand);
58 if (!other || other->m_image != m_image) return false;
59
61 m_clli = other->m_clli;
62 m_cvi = other->m_cvi;
63
64 return true;
65}
std::optional< KisColorVolumeInformation > m_oldCvi
std::optional< KisRelativeContentLightLevelInformation > m_oldClli
std::optional< KisColorVolumeInformation > m_cvi
KisChangeImageHdrMetadataCommand(KisImageWSP image, std::optional< double > referenceWhite, std::optional< KisRelativeContentLightLevelInformation > clli, std::optional< KisColorVolumeInformation > cvi, KUndo2Command *parent=nullptr)
std::optional< KisRelativeContentLightLevelInformation > m_clli
bool mergeWith(const KUndo2Command *other) override
std::optional< KisRelativeContentLightLevelInformation > relativeContentLightLevelInformation() const
relativeContentLightLevelInformation This returns (optionally) a KisRelativeContentLightLevelInformat...
void setColorVolumeInformation(const std::optional< KisColorVolumeInformation > cvi)
Set the color volume information.
void setHdrReferenceWhiteLightLevel(const std::optional< double > value)
Set the diffuse white light level, in cd/m²
std::optional< double > hdrReferenceWhiteLightLevel() const
HDR Reference White livel.
std::optional< KisColorVolumeInformation > colorVolumeInformation() const
colorVolumeInformation
void setRelativeContentLightLevelInformation(const std::optional< KisRelativeContentLightLevelInformation > clli)
KisSharedPtr< T > toStrongRef() const
toStrongRef returns a KisSharedPtr which may be dereferenced.
KUndo2MagicString kundo2_i18n(const char *text)