simple add file format check from pkg

This commit is contained in:
2025-08-06 19:01:05 +08:00
parent 429292b446
commit ff3437457a

View File

@ -155,7 +155,11 @@ example:
ExtractTex(texPath); ExtractTex(texPath);
} }
else if (entry.Type == ".gif") else if (entry.Type == ".gif" ||
entry.Type == ".jpg" ||
entry.Type == ".png" ||
entry.Type == ".jpeg" ||
entry.Type == ".webp")
{ {
BinaryWriter writer(m_OutDir / entry.FullPath, std::ios::binary); BinaryWriter writer(m_OutDir / entry.FullPath, std::ios::binary);
@ -213,6 +217,7 @@ example:
if (tex.IsGif) if (tex.IsGif)
{ {
// TODO: to impl this
//Read Frame //Read Frame
} }
// ReadHeader end // ReadHeader end
@ -330,7 +335,7 @@ example:
// return ImageResult // return ImageResult
// data format // data format
std::filesystem::path outPath = m_OutDir / reader->GetFileName(); std::filesystem::path outPath = reader->GetFilePath();
outPath.replace_extension(GetFileExtension(format)); outPath.replace_extension(GetFileExtension(format));
std::cout << "convert file: " << outPath << std::endl; std::cout << "convert file: " << outPath << std::endl;