MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / containsSRGB

Function containsSRGB

src/OpenColorIO/ConfigUtils.cpp:171–189  ·  view source on GitHub ↗

Return true if the color space name or its aliases contains sRGB (case-insensitive).

Source from the content-addressed store, hash-verified

169// Return true if the color space name or its aliases contains sRGB (case-insensitive).
170//
171bool 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

Callers 1

IdentifyInterchangeSpaceFunction · 0.85

Calls 5

LowerFunction · 0.85
FindFunction · 0.85
getNameMethod · 0.45
getNumAliasesMethod · 0.45
getAliasMethod · 0.45

Tested by

no test coverage detected