node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

imageTool

imageTool

api

    const imgTool = require('imageTool');
    imgTool(opt)

opt

min:boolean 是否压缩,默认false

resize:boolean尺寸调整,默认false

resizeList: array 尺寸大小,默认[40, 80, 160, 240, 320, 480, 640, 800]

quality:品质0-100,默认80

src:图片源,resize时候不支持模糊匹配,string/array

output:输出路径,不支持返回buffer,默认'output'