125 {
126#if !FL_COLOR_PROFILE_RUNTIME
128 return false;
129#else
130
131
133 mColorProfile.mStaticProfile = nullptr;
134 if (profile.native_code_depth == 0 || profile.native_code_depth > 16 ||
144 (profile.response_lut_size != 0 &&
145 profile.response_lut_white1 == nullptr))) ||
149 (profile.response_lut_size != 0 &&
150 profile.response_lut_white2 == nullptr))) ||
151 (profile.response_lut_size != 0 &&
152 (profile.response_lut_r == nullptr || profile.response_lut_g == nullptr || profile.response_lut_b == nullptr))) {
154 return false;
155 }
160 return false;
161 }
164 profile.response_lut_size)) {
166 return false;
167 }
170 profile.response_lut_size)) {
172 return false;
173 }
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192 const bool clearing_legacy =
196 if (!had_profile && clearing_legacy && !mWarnedLegacyCleared) {
197 FL_WARN(
"Color profile clears legacy correction/temperature/gamma");
200 mWarnedLegacyCleared = true;
201 }
202
203
204
205
206
209 mColorProfile.mSource = source;
210 mColorProfile.mGamut = gamut;
211 mColorProfile.mRequested = true;
212 mColorProfile.mUseGlobalSourceDefault = global_source;
217 return true;
218#endif
219 }
#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