支持cbz的 .webp 图像格式

This commit is contained in:
Chenx221 2024-08-01 14:39:06 +08:00
parent 8a3af1fad4
commit 55b19f6976

View File

@ -96,14 +96,14 @@ namespace ConsoleApp1
// 确保漫画文件夹中包含图像文件 // 确保漫画文件夹中包含图像文件
string[] imageFiles = Directory.GetFiles(comicFolder, "*.*", SearchOption.AllDirectories) string[] imageFiles = Directory.GetFiles(comicFolder, "*.*", SearchOption.AllDirectories)
.Where(file => file.ToLower().EndsWith(".jpg") || file.ToLower().EndsWith(".png")) .Where(file => file.ToLower().EndsWith(".jpg") || file.ToLower().EndsWith(".png") || file.ToLower().EndsWith(".webp"))
.ToArray(); .ToArray();
if (imageFiles.Length == 0) if (imageFiles.Length == 0)
{ {
lock (consoleLock) lock (consoleLock)
{ {
Console.WriteLine($"在漫画文件夹 {comicFolder} 中未找到任何图像文件 (.jpg or .png)。"); Console.WriteLine($"在漫画文件夹 {comicFolder} 中未找到任何图像文件 (.jpg , .png or .webp)。");
} }
return; // 继续处理下一个漫画文件夹 return; // 继续处理下一个漫画文件夹
} }