兼容了渐进式jpg

This commit is contained in:
kura 2025-11-28 10:58:20 +08:00
parent 263865195b
commit 77cfad7ee6
4 changed files with 4 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -113,9 +113,10 @@ function processDirectory(inputDir, outputDir, options, currentDepth = 0) {
inputData.length, inputData.length,
0, 0,
0, 0,
0,
0,
options.quality, // 使用命令行指定的质量 options.quality, // 使用命令行指定的质量
outputSizePtr, outputSizePtr,
options.alpha ? 1 : 0
); );
// 获取输出大小 // 获取输出大小

View File

@ -1,13 +1,13 @@
{ {
"name": "img2webp-cli", "name": "img2webp-cli",
"version": "1.0.1", "version": "1.0.2",
"description": "Convert images to WebP format using WASM in cli", "description": "Convert images to WebP format using WASM in cli",
"type": "module", "type": "module",
"bin": { "bin": {
"cp2webp": "./bin/cli.js" "cp2webp": "./bin/cli.js"
}, },
"scripts": { "scripts": {
"test": "node bin/cli.js -i ./test -o ./output", "test": "node bin/cli.js -i ./test/test1 -o ./output",
"goGlobal": "npm link", "goGlobal": "npm link",
"testGlobal": "cp2webp -i /Users/kura/Downloads/PC端图标 -o /Users/kura/Downloads/PC端图标/output -r 2" "testGlobal": "cp2webp -i /Users/kura/Downloads/PC端图标 -o /Users/kura/Downloads/PC端图标/output -r 2"
}, },

Binary file not shown.