MCPcopy Create free account
hub / github.com/RenderKit/oidn / getExtension

Function getExtension

apps/utils/image_io.cpp:37–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 }
36
37 std::string getExtension(const std::string& filename)
38 {
39 const size_t pos = filename.find_last_of('.');
40 if (pos == std::string::npos)
41 return ""; // no extension
42 else
43 {
44 std::string ext = filename.substr(pos + 1);
45 for (auto& c : ext) c = tolower(c);
46 return ext;
47 }
48 }
49
50 std::shared_ptr<ImageBuffer> loadImagePFM(const DeviceRef& device,
51 const std::string& filename,

Callers 3

loadImageFunction · 0.85
saveImageFunction · 0.85
isSrgbImageFunction · 0.85

Calls 1

substrMethod · 0.80

Tested by

no test coverage detected