兼容了渐进式jpg
This commit is contained in:
parent
263865195b
commit
77cfad7ee6
3
index.js
3
index.js
@ -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
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// 获取输出大小
|
// 获取输出大小
|
||||||
|
|||||||
@ -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.
Loading…
Reference in New Issue
Block a user