From ff3437457ab87fc5142dfc73c9afdc57fb7e41e1 Mon Sep 17 00:00:00 2001 From: Atdunbg <979541498@qq.com> Date: Wed, 6 Aug 2025 19:01:05 +0800 Subject: [PATCH] simple add file format check from pkg --- expkg/src/EXPKG/EXPKG.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/expkg/src/EXPKG/EXPKG.cpp b/expkg/src/EXPKG/EXPKG.cpp index 429aafc..5c565c3 100644 --- a/expkg/src/EXPKG/EXPKG.cpp +++ b/expkg/src/EXPKG/EXPKG.cpp @@ -155,7 +155,11 @@ example: 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); @@ -213,6 +217,7 @@ example: if (tex.IsGif) { + // TODO: to impl this //Read Frame } // ReadHeader end @@ -330,7 +335,7 @@ example: // return ImageResult // data format - std::filesystem::path outPath = m_OutDir / reader->GetFileName(); + std::filesystem::path outPath = reader->GetFilePath(); outPath.replace_extension(GetFileExtension(format)); std::cout << "convert file: " << outPath << std::endl;