digiKam
Loading...
Searching...
No Matches
iccprofile.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2009-08-07
7 * Description : a wrapper class for an ICC color profile
8 *
9 * SPDX-FileCopyrightText: 2005-2006 by F.J. Cruz <fj dot cruz at supercable dot es>
10 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 * SPDX-FileCopyrightText: 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 *
15 * ============================================================ */
16
17#pragma once
18
19// Qt includes
20
21#include <QByteArray>
22#include <QMetaType>
23#include <QSharedData>
24
25// Local includes
26
27#include "digikam_export.h"
28
29namespace Digikam
30{
31
32class DIGIKAM_EXPORT IccProfile
33{
34public:
35
51
52public:
53
57 IccProfile();
58
62 explicit IccProfile(const QByteArray& data);
63
67 explicit IccProfile(const QString& filePath);
68
72 static IccProfile sRGB();
73 static IccProfile adobeRGB();
74 static IccProfile wideGamutRGB();
75 static IccProfile proPhotoRGB();
76
80 static QList<IccProfile> defaultProfiles();
81
82 IccProfile(const IccProfile& other);
84
85 IccProfile& operator=(const IccProfile& other);
86
87 bool isNull() const;
88
94 bool operator==(const IccProfile& other) const;
95
96 bool operator!=(const IccProfile& other) const
97 {
98 return !operator==(other);
99 }
100
104 bool isSameProfileAs(IccProfile& other);
105
112 bool open();
113
118 void close();
119
123 bool isOpen() const;
124
129 QString filePath() const;
130
134 QString description();
135
136 ProfileType type();
137
142 QByteArray data();
143
147 bool writeToFile(const QString& filePath);
148
152 void* handle() const;
153
154 operator void*() const
155 {
156 return handle();
157 }
158
163 static QStringList defaultSearchPaths();
164
165 static QList<IccProfile> scanDirectories(const QStringList& dirs);
166
167 static void considerOriginalAdobeRGB(const QString& filePath);
168
169private:
170
171 IccProfile(const char* const location, const QString& relativePath);
172
173private:
174
175 class Private;
176 QSharedDataPointer<Private> d;
177};
178
179// --------------------------------------------------------------------------------------
180
181class DIGIKAM_EXPORT LcmsLock
182{
183public:
184
188 LcmsLock();
189 ~LcmsLock();
190
191private:
192
193 // Disable
194 LcmsLock(const LcmsLock&) = delete;
195 LcmsLock& operator=(const LcmsLock&) = delete;
196};
197
198} // namespace Digikam
199
200Q_DECLARE_METATYPE(Digikam::IccProfile)
Definition iccprofile.h:33
ProfileType
Definition iccprofile.h:37
@ DeviceLink
Definition iccprofile.h:48
@ Display
For a display device like a monitor.
Definition iccprofile.h:45
@ Output
For an output device like a printer.
Definition iccprofile.h:43
@ Input
For an input device like a scanner or digital camera.
Definition iccprofile.h:41
@ InvalidType
Returned for a null profile or an unknown (non-standard) profile type.
Definition iccprofile.h:39
@ ColorSpace
Definition iccprofile.h:47
@ Abstract
Definition iccprofile.h:46
static QList< IccProfile > scanDirectories(const QStringList &dirs)
bool operator!=(const IccProfile &other) const
Definition iccprofile.h:96
Definition iccprofile.h:182
Definition datefolderview.cpp:34
bool operator==(const SearchTextSettings &a, const SearchTextSettings &b)
Definition searchtextbar.cpp:40