#角色 character-img增加对jpeg格式的图片识别

This commit is contained in:
yoimiya-kokomi 2022-05-02 06:13:59 +08:00
parent db67f380fd
commit 5613993879

View File

@ -39,7 +39,7 @@ class Character extends Base {
let list = {};
let imgs = fs.readdirSync(charImgPath);
imgs = imgs.filter((img) => /\.(png|jpg|webp)/i.test(img));
imgs = imgs.filter((img) => /\.(png|jpg|webp|jpeg)/i.test(img));
lodash.forEach(imgs, (img) => {
list[img] = `character-img/${name}/${img}`
@ -53,7 +53,7 @@ class Character extends Base {
}
imgs = fs.readdirSync(charImgPlusPath);
imgs = imgs.filter((img) => /\.(png|jpg|webp)/i.test(img));
imgs = imgs.filter((img) => /\.(png|jpg|webp|jpeg)/i.test(img));
lodash.forEach(imgs, (img) => {
list[img] = `miao-res-plus/character-img/${name}/${img}`