| 311 | } |
| 312 | |
| 313 | Image ReadFromFile(std::string_view path, ImageFormat format) |
| 314 | { |
| 315 | switch (format) |
| 316 | { |
| 317 | case ImageFormat::automatic: |
| 318 | return ReadFromFile(path, GetImageFormatFromPath(path)); |
| 319 | default: |
| 320 | { |
| 321 | std::ifstream fs(fs::u8path(path), std::ios::binary); |
| 322 | return ReadFromStream(fs, format); |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | Image ReadFromBuffer(const std::vector<uint8_t>& buffer, ImageFormat format) |
| 328 | { |
nothing calls this directly
no test coverage detected