This commit is contained in:
12600k-rog-d4
2026-04-03 01:30:36 +08:00
parent 989af85df0
commit 6a486edde8
69 changed files with 2059 additions and 25 deletions

27
check-image-info.js Normal file
View File

@@ -0,0 +1,27 @@
const sharp = require('sharp');
const path = require('path');
const fs = require('fs');
async function checkImageInfo() {
const imageDir = path.join(__dirname, '产品', '飞牛 NAS', 'fyd-亚克力机箱 - 单', '详情', 'image');
const imageFiles = fs.readdirSync(imageDir).filter(file => file.endsWith('.jpg'));
console.log('📸 图片信息检查\n');
for (const imageFile of imageFiles) {
const imagePath = path.join(imageDir, imageFile);
const metadata = await sharp(imagePath).metadata();
console.log(`${imageFile}:`);
console.log(` 宽度: ${metadata.width}px`);
console.log(` 高度: ${metadata.height}px`);
console.log(` 格式: ${metadata.format}`);
console.log('');
}
}
checkImageInfo().catch(error => {
console.error('💥 检查过程出错:', error);
process.exit(1);
});