todo: lossless webp input

This commit is contained in:
Nycki 2024-11-30 19:47:09 -08:00
parent d209608106
commit 4d097fdefb

View file

@ -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}`,