165 QReadLocker l(&
d->lock);
169 bool transferMatch = (transferType == 2);
171 if (
int(profile->getColorPrimaries()) == colorantType) {
172 colorantTypeMatch =
true;
176 if (
int(profile->getTransferCharacteristics()) == transferType) {
177 transferMatch =
true;
183 if (profile->hasColorants() && colorants.size() == 8) {
185 if (col.size() < 8 || wp.size() < 2) {
189 QVector<double> compare = {wp[0], wp[1], col[0], col[1], col[3], col[4], col[6], col[7]};
191 for (
int i = 0; i < compare.size(); i++) {
192 colorantMatch = std::fabs(compare[i] - colorants[i]) < error;
193 if (!colorantMatch) {
198 if (wp.size() < 2 || colorants.size() < 2) {
202 if (std::fabs(wp[0] - colorants[0]) < error && std::fabs(wp[1] - colorants[1]) < error) {
203 colorantMatch =
true;
208 if (transferMatch && colorantMatch && colorantTypeMatch) {
209 profiles.push_back(profile);