Sort files by alphabetical order in color tester
This commit is contained in:
parent
98e9056dfe
commit
70014f32ec
|
@ -210,15 +210,26 @@ int main(int argc, char** argv)
|
||||||
};
|
};
|
||||||
Vector<ImageUpload> imageUploads;
|
Vector<ImageUpload> imageUploads;
|
||||||
Vector<bool> imageIsHDR;
|
Vector<bool> imageIsHDR;
|
||||||
if (std::filesystem::exists("images"))
|
if (!std::filesystem::exists("images")) {
|
||||||
|
log::err("No image directory!");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Vector<std::string> filenames;
|
||||||
|
|
||||||
for (const auto &entry : std::filesystem::directory_iterator("images"))
|
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;
|
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)
|
if (!r_pngData)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue