change cmakelists and gitignore, commit third librarys source

This commit is contained in:
Jie
2024-06-18 13:25:20 +08:00
parent c1c0b98b5c
commit 83cc278754
10 changed files with 77 additions and 1 deletions

15
src/UtilTool.cc Normal file
View File

@@ -0,0 +1,15 @@
#include "UtilTool.h"
#include <filesystem>
bool UtilTool::CheckFileIsImage(const std::string& filepath){
//简单实现, 通过后缀判断
auto path = std::filesystem::path(filepath);
auto su = path.extension().string();
for(const auto& type : ImageType){
if (su.find(type) != std::string::npos){
return true;
}
}
return false;
}