diff --git a/src/Apps/Tools/ColorTester.cpp b/src/Apps/Tools/ColorTester.cpp index 8250299..d0af0f9 100644 --- a/src/Apps/Tools/ColorTester.cpp +++ b/src/Apps/Tools/ColorTester.cpp @@ -210,15 +210,26 @@ int main(int argc, char** argv) }; Vector imageUploads; Vector imageIsHDR; - if (std::filesystem::exists("images")) + if (!std::filesystem::exists("images")) { + log::err("No image directory!"); + return 1; + } + { + Vector filenames; + for (const auto &entry : std::filesystem::directory_iterator("images")) + filenames.push_back(std::string(entry.path())); + + std::sort(filenames.begin(), filenames.end(), [](const auto& a, const auto& b) { return a < b; }); + + for (auto& entry : filenames) { - std::cout << entry.path() << std::endl; + std::cout << entry << std::endl; bool imageHDR = true;//std::string(entry.path()).find(".pq.") != std::string::npos; - auto r_pngData = fs::OpenFileIntoBuffer(entry.path().c_str()); + auto r_pngData = fs::OpenFileIntoBuffer(entry.c_str()); if (!r_pngData) continue;