127 {
128#if !FL_COLOR_PROFILE_RUNTIME
130 return false;
131#else
132
133
135 mColorProfile.mStaticProfile = nullptr;
136 if (profile.native_code_depth == 0 || profile.native_code_depth > 16 ||
146 (profile.response_lut_size != 0 &&
147 profile.response_lut_white1 == nullptr))) ||
151 (profile.response_lut_size != 0 &&
152 profile.response_lut_white2 == nullptr))) ||
153 (profile.response_lut_size != 0 &&
154 (profile.response_lut_r == nullptr || profile.response_lut_g == nullptr || profile.response_lut_b == nullptr))) {
156 return false;
157 }
162 return false;
163 }
166 profile.response_lut_size)) {
168 return false;
169 }
172 profile.response_lut_size)) {
174 return false;
175 }
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194 const bool clearing_legacy =
198 if (!had_profile && clearing_legacy && !mWarnedLegacyCleared) {
199 FL_WARN(
"Color profile clears legacy correction/temperature/gamma");
202 mWarnedLegacyCleared = true;
203 }
204
205
206
207
208
211 mColorProfile.mSource = source;
212 mColorProfile.mGamut = gamut;
213 mColorProfile.mRequested = true;
214 mColorProfile.mUseGlobalSourceDefault = global_source;
219 return true;
220#endif
221 }
#define DISABLE_DITHER
Disable dithering.
@ UncorrectedTemperature
Uncorrected temperature (0xFFFFFF)
@ UncorrectedColor
Uncorrected color (0xFFFFFF)
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
void installColorPipelineHooks() FL_NO_EXCEPT
Point the hooks at the real implementations.
static ChannelEvents & instance() FL_NO_EXCEPT
fl::function_list< void(const ColorProfileEvent &)> onColorProfileWarning
static bool validPrimaries(const RgbPrimaries &primaries) FL_NO_EXCEPT
void clearColorProfile() FL_NO_EXCEPT
fl::optional< float > mGamma
static bool validResponseLut(const u16 *values, u16 size) FL_NO_EXCEPT
bool hasColorProfile() const FL_NO_EXCEPT
static bool validChromaticity(const float xy[2]) FL_NO_EXCEPT
static bool finitePositive(float value) FL_NO_EXCEPT