lite图片编译优化

Signed-off-by: fanjiaojiao <fanjiaojiao@huawei.com>
This commit is contained in:
fanjiaojiao
2022-08-30 18:38:32 +08:00
parent 03a225b464
commit bcf1eb346f
+2 -2
View File
@@ -74,10 +74,10 @@ async function img2bin(imgPath) {
if (version <=6) {
const binPath1 = imgPath.replace(/(\.png|\.jpg|\.bmp|\.jpeg|\.BMP|\.JPG|\.PNG|\.JPEG)$/, '.bin');
fs.writeFileSync(binPath1, Buffer.from(binBuffer));
}else{
}
const binPath2 = imgPath+".bin";
fs.writeFileSync(binPath2, Buffer.from(binBuffer));
}
} catch (err) {
const imageName = _path.basename(imgPath);