1
/* ============================================================
3
* This file is a part of kipi-plugins project
4
* http://www.kipi-plugins.org
7
* Description : Raw decoding settings
9
* Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
* Copyright (C) 2006-2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11
* Copyright (C) 2007-2008 by Guillaume Castagnino <casta at xwing dot info>
13
* This program is free software; you can redistribute it
14
* and/or modify it under the terms of the GNU General
15
* Public License as published by the Free Software Foundation;
16
* either version 2, or (at your option) any later version.
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* ============================================================ */
27
#include "rawdecodingsettings.h"
32
RawDecodingSettings::RawDecodingSettings()
34
autoBrightness = true;
35
sixteenBitsImage = false;
37
RAWQuality = BILINEAR;
38
inputColorSpace = NOINPUTCS;
39
outputColorSpace = SRGB;
40
RGBInterpolate4Colors = false;
41
DontStretchPixels = false;
43
whiteBalance = CAMERA;
44
customWhiteBalance = 6500;
45
customWhiteBalanceGreen = 1.0;
46
medianFilterPasses = 0;
48
halfSizeColorImage = false;
50
enableBlackPoint = false;
53
enableWhitePoint = false;
56
enableNoiseReduction = false;
59
enableCACorrection = false;
60
caMultiplier[0] = 1.0;
61
caMultiplier[1] = 1.0;
63
inputProfile = QString();
64
outputProfile = QString();
66
deadPixelMap = QString();
68
whiteBalanceArea = QRect();
71
bool RawDecodingSettings::operator==(const RawDecodingSettings &o) const
73
return autoBrightness == o.autoBrightness
74
&& sixteenBitsImage == o.sixteenBitsImage
75
&& brightness == o.brightness
76
&& RAWQuality == o.RAWQuality
77
&& inputColorSpace == o.inputColorSpace
78
&& outputColorSpace == o.outputColorSpace
79
&& RGBInterpolate4Colors == o.RGBInterpolate4Colors
80
&& DontStretchPixels == o.DontStretchPixels
81
&& unclipColors == o.unclipColors
82
&& whiteBalance == o.whiteBalance
83
&& customWhiteBalance == o.customWhiteBalance
84
&& customWhiteBalanceGreen == o.customWhiteBalanceGreen
85
&& halfSizeColorImage == o.halfSizeColorImage
86
&& enableBlackPoint == o.enableBlackPoint
87
&& blackPoint == o.blackPoint
88
&& enableWhitePoint == o.enableWhitePoint
89
&& whitePoint == o.whitePoint
90
&& enableNoiseReduction == o.enableNoiseReduction
91
&& NRThreshold == o.NRThreshold
92
&& enableCACorrection == o.enableCACorrection
93
&& caMultiplier[0] == o.caMultiplier[0]
94
&& caMultiplier[1] == o.caMultiplier[1]
95
&& medianFilterPasses == o.medianFilterPasses
96
&& inputProfile == o.inputProfile
97
&& outputProfile == o.outputProfile
98
&& deadPixelMap == o.deadPixelMap
99
&& whiteBalanceArea == o.whiteBalanceArea
103
RawDecodingSettings::~RawDecodingSettings()
107
void RawDecodingSettings::optimizeTimeLoading()
109
autoBrightness = true;
110
sixteenBitsImage = true;
112
RAWQuality = BILINEAR;
113
inputColorSpace = NOINPUTCS;
114
outputColorSpace = SRGB;
115
RGBInterpolate4Colors = false;
116
DontStretchPixels = false;
118
whiteBalance = CAMERA;
119
customWhiteBalance = 6500;
120
customWhiteBalanceGreen = 1.0;
121
halfSizeColorImage = true;
122
medianFilterPasses = 0;
124
enableBlackPoint = false;
127
enableWhitePoint = false;
130
enableNoiseReduction = false;
133
enableCACorrection = false;
134
caMultiplier[0] = 1.0;
135
caMultiplier[1] = 1.0;
137
inputProfile = QString();
138
outputProfile = QString();
140
deadPixelMap = QString();
142
whiteBalanceArea = QRect();
145
QDebug operator<<(QDebug dbg, const RawDecodingSettings& s)
147
dbg.nospace() << "RawDecodingSettings::autoBrightness: " << s.autoBrightness << ", ";
148
dbg.nospace() << "RawDecodingSettings::sixteenBitsImage: " << s.sixteenBitsImage << ", ";
149
dbg.nospace() << "RawDecodingSettings::brightness: " << s.brightness << ", ";
150
dbg.nospace() << "RawDecodingSettings::RAWQuality: " << s.RAWQuality << ", ";
151
dbg.nospace() << "RawDecodingSettings::inputColorSpace: " << s.inputColorSpace << ", ";
152
dbg.nospace() << "RawDecodingSettings::outputColorSpace: " << s.outputColorSpace << ", ";
153
dbg.nospace() << "RawDecodingSettings::RGBInterpolate4Colors: " << s.RGBInterpolate4Colors << ", ";
154
dbg.nospace() << "RawDecodingSettings::DontStretchPixels: " << s.DontStretchPixels << ", ";
155
dbg.nospace() << "RawDecodingSettings::unclipColors: " << s.unclipColors << ", ";
156
dbg.nospace() << "RawDecodingSettings::whiteBalance: " << s.whiteBalance << ", ";
157
dbg.nospace() << "RawDecodingSettings::customWhiteBalance: " << s.customWhiteBalance << ", ";
158
dbg.nospace() << "RawDecodingSettings::customWhiteBalanceGreen: " << s.customWhiteBalanceGreen << ", ";
159
dbg.nospace() << "RawDecodingSettings::halfSizeColorImage: " << s.halfSizeColorImage << ", ";
160
dbg.nospace() << "RawDecodingSettings::enableBlackPoint: " << s.enableBlackPoint << ", ";
161
dbg.nospace() << "RawDecodingSettings::blackPoint: " << s.blackPoint << ", ";
162
dbg.nospace() << "RawDecodingSettings::enableWhitePoint: " << s.enableWhitePoint << ", ";
163
dbg.nospace() << "RawDecodingSettings::whitePoint: " << s.whitePoint << ", ";
164
dbg.nospace() << "RawDecodingSettings::enableNoiseReduction: " << s.enableNoiseReduction << ", ";
165
dbg.nospace() << "RawDecodingSettings::NRThreshold: " << s.NRThreshold << ", ";
166
dbg.nospace() << "RawDecodingSettings::enableCACorrection: " << s.enableCACorrection << ", ";
167
dbg.nospace() << "RawDecodingSettings::caMultiplier: " << s.caMultiplier << ", ";
168
dbg.nospace() << "RawDecodingSettings::medianFilterPasses: " << s.medianFilterPasses << ", ";
169
dbg.nospace() << "RawDecodingSettings::inputProfile: " << s.inputProfile << ", ";
170
dbg.nospace() << "RawDecodingSettings::outputProfile: " << s.outputProfile << ", ";
171
dbg.nospace() << "RawDecodingSettings::deadPixelMap: " << s.deadPixelMap << ", ";
172
dbg.nospace() << "RawDecodingSettings::whiteBalanceArea: " << s.whiteBalanceArea;
176
} // namespace KDcrawIface