From 383d64dfae39a088095b1b543348216b07d8047e Mon Sep 17 00:00:00 2001 From: TechJeeper Date: Sun, 21 Dec 2025 18:41:23 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20Robust=203MF=20thumbnail=20gen?= =?UTF-8?q?eration=20with=20webp=20support=20and=20recursive=20=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/main.js b/main.js index 55fb26a..a62e4ae 100644 --- a/main.js +++ b/main.js @@ -2356,14 +2356,6 @@ ipcMain.handle('get3MFImages', async (event, filePath) => { } } - // Helper to check if file is an image and not a system file - const isImage = (path) => { - const normalized = path.replace(/\\/g, '/'); - // Skip Mac/System files - if (normalized.includes('__MACOSX/') || normalized.split('/').pop().startsWith('._')) return false; - return normalized.match(/\.(png|jpe?g|gif|webp)$/i); - }; - // If plate_1.png wasn't found, look for any images in the Metadata directory first console.log('\nLooking for any images in Metadata directory...'); const imageFiles = []; @@ -2372,7 +2364,7 @@ ipcMain.handle('get3MFImages', async (event, filePath) => { if (path.toLowerCase().includes('metadata/') && path.match(/\.(png|jpe?g|gif|webp)$/i)) { console.log('Found image in Metadata:', path); const imageData = await file.async('base64'); - imageFiles.push(`data:image/${path.split('.').pop().toLowerCase()};base64,${imageData}`); + imageFiles.push(`data:image/${path.split('.').pop()};base64,${imageData}`); } } @@ -2383,7 +2375,7 @@ ipcMain.handle('get3MFImages', async (event, filePath) => { if (path.match(/\.(png|jpe?g|gif|webp)$/i)) { console.log('Found image:', path); const imageData = await file.async('base64'); - imageFiles.push(`data:image/${path.split('.').pop().toLowerCase()};base64,${imageData}`); + imageFiles.push(`data:image/${path.split('.').pop()};base64,${imageData}`); } } }