Return true if the color space name or its aliases contains sRGB (case-insensitive).
| 169 | // Return true if the color space name or its aliases contains sRGB (case-insensitive). |
| 170 | // |
| 171 | bool containsSRGB(const ConstColorSpaceRcPtr & cs) |
| 172 | { |
| 173 | std::string name = StringUtils::Lower(cs->getName()); |
| 174 | if (StringUtils::Find(name, "srgb") != std::string::npos) |
| 175 | { |
| 176 | return true; |
| 177 | } |
| 178 | |
| 179 | size_t nbOfAliases = cs->getNumAliases(); |
| 180 | for (size_t i = 0; i < nbOfAliases; i++) |
| 181 | { |
| 182 | if (StringUtils::Find(cs->getAlias(i), "srgb") != std::string::npos) |
| 183 | { |
| 184 | return true; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | return false; |
| 189 | } |
| 190 | |
| 191 | // Find a color space where isData is false and it has neither a to_ref or from_ref |
| 192 | // transform. Currently only selecting scene-referred spaces. Note: this returns |
no test coverage detected