We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function isConertable() =>单独做成一个 post 在client先问可不可以转换,然后再转换。两个 请求。
module.exports.minifyOneFile
不在通过 oldAvgImgSize判断
async function convertImage(imgFilePath, outputImgPath, oldAvgImgSize){ try{ let opt; const stat = await pfs.stat(p); const oldImgSize = stat.size; if(oldImgSize > img_reduce_resolution_threshold){ opt = [imgFilePath, "-strip", "-quality", img_convert_quality, "-resize", `${img_reduce_resolution_dimension}\>`, outputImgPath ]; }else{ opt = [imgFilePath, "-strip", "-quality", img_convert_quality, outputImgPath ]; } let {stdout, stderr} = await execa("magick", opt); return {stdout, stderr}; }catch(e){ logFail("[convertImage]", e); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
function isConertable() =>单独做成一个 post
在client先问可不可以转换,然后再转换。两个 请求。
module.exports.minifyOneFile
不在通过 oldAvgImgSize判断
The text was updated successfully, but these errors were encountered: