| 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, |
no test coverage detected