Comparing version 0.7.0 to 0.7.1
{ | ||
"name": "impro", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Image processing engine", | ||
@@ -5,0 +5,0 @@ "author": "Andreas Lind <andreaslindpetersen@gmail.com>", |
@@ -11,2 +11,3 @@ const requireOr = require('require-or'); | ||
'floyd', | ||
'ncolors', | ||
'nofs', | ||
@@ -27,2 +28,4 @@ 'ordered', | ||
); | ||
case 'ncolors': | ||
return args.length === 1 && args[0] >= 2 && args[0] <= 256; | ||
case 'speed': | ||
@@ -42,5 +45,13 @@ return args.length === 1 && args[0] >= 1 && args[0] <= 11; | ||
var commandLineArgs = []; | ||
var nColors; | ||
operations.forEach(operation => { | ||
if (operation.name === 'ncolors') { | ||
nColors = operation.args[0]; | ||
return; | ||
} | ||
commandLineArgs.push('--' + operation.name, ...operation.args); | ||
}); | ||
if (nColors) { | ||
commandLineArgs.push(nColors); | ||
} | ||
commandLineArgs.push('-'); | ||
@@ -47,0 +58,0 @@ |
@@ -123,3 +123,3 @@ function parseImproQueryString(queryString, improInstance, allowOperation) { | ||
} else if (engineName === 'pngquant') { | ||
result.push(`speed=${bit}`); | ||
result.push(`ncolors=${bit}`); | ||
} else if (lastSeenOptionIndex > -1) { | ||
@@ -126,0 +126,0 @@ result[lastSeenOptionIndex] += `=${bit}`; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67458
1793