| 72 | |
| 73 | #ifdef DLIB_WEBP_SUPPORT |
| 74 | std::string to_webp_name (const std::string& filename) |
| 75 | { |
| 76 | std::string::size_type pos = filename.find_last_of("."); |
| 77 | if (pos == std::string::npos) |
| 78 | throw dlib::error("invalid filename: " + filename); |
| 79 | return filename.substr(0,pos) + ".webp"; |
| 80 | } |
| 81 | #endif |
| 82 | |
| 83 | // ---------------------------------------------------------------------------------------- |
no test coverage detected