digiKam
Loading...
Searching...
No Matches
imagelevels.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 : 2004-07-29
7 * Description : image levels manipulation methods.
8 *
9 * SPDX-FileCopyrightText: 2004-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QUrl>
20
21// Local includes
22
23#include "dcolor.h"
24#include "digikam_export.h"
25
26namespace Digikam
27{
28
29class ImageHistogram;
30
31class DIGIKAM_EXPORT ImageLevels
32{
33
34public:
35
36 explicit ImageLevels(bool sixteenBit);
38
39 bool isDirty();
40 bool isSixteenBits();
41 void reset();
42
46 void levelsChannelReset(int channel);
47 void levelsAuto(const ImageHistogram* const hist);
48 void levelsChannelAuto(const ImageHistogram* const hist, int channel);
49 int levelsInputFromColor(int channel, const DColor& color);
50 void levelsBlackToneAdjustByColors(int channel, const DColor& color);
51 void levelsGrayToneAdjustByColors(int channel, const DColor& color);
52 void levelsWhiteToneAdjustByColors(int channel, const DColor& color);
53 void levelsCalculateTransfers();
54 float levelsLutFunc(int nchannels, int channel, float value);
55 void levelsLutSetup(int nchannels);
56 void levelsLutProcess(uchar* const srcPR, uchar* const destPR, uint w, uint h);
57
61 void setLevelGammaValue(int channel, double val);
62 void setLevelLowInputValue(int channel, int val);
63 void setLevelHighInputValue(int channel, int val);
64 void setLevelLowOutputValue(int channel, int val);
65 void setLevelHighOutputValue(int channel, int val);
66
67 double getLevelGammaValue(int channel);
68 int getLevelLowInputValue(int channel);
69 int getLevelHighInputValue(int channel);
70 int getLevelLowOutputValue(int channel);
71 int getLevelHighOutputValue(int channel);
72
76 bool saveLevelsToGimpLevelsFile(const QUrl& fileUrl);
77 bool loadLevelsFromGimpLevelsFile(const QUrl& fileUrl);
78
79private:
80
81 // Disable
82 ImageLevels(const ImageLevels&) = delete;
83 ImageLevels& operator=(const ImageLevels&) = delete;
84
85private:
86
87 class Private;
88 Private* const d = nullptr;
89};
90
91} // namespace Digikam
Definition dcolor.h:33
Definition imagehistogram.h:34
Definition imagelevels.h:32
qulonglong value
Definition itemviewutilities.cpp:585
Definition datefolderview.cpp:34