From 4d097fdefbf77e623826d4fcc866a039a1b202c7 Mon Sep 17 00:00:00 2001 From: Nicholas Lamicela Date: Sat, 30 Nov 2024 19:47:09 -0800 Subject: [PATCH] todo: lossless webp input --- tools/img-shrink.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/img-shrink.js b/tools/img-shrink.js index 8a868ee..dcf9608 100644 --- a/tools/img-shrink.js +++ b/tools/img-shrink.js @@ -12,7 +12,9 @@ async function main() { const file = path.parse(fileIn); const fileOut = `${dirOut}/${file.name}.webp`; + // TODO: what if the input image is already a lossless webp? const lossless = file.ext === '.png'; + const command = [ `magick "${fileIn}"`, `-define webp:lossless=${lossless}`,