# ImageMinify - 一个基于NodeJS+GraphicsMagick的命令行(单张/批量)图片压缩工具 ## Purpose 一个基于NodeJS+GraphicsMagick的命令行(单张/批量)图片压缩工具,支持命令行交互式指定压缩格式和压缩比等,同时支持静默模式 ## Overview ``` Waiting... ``` ## Features ``` + 单张压缩 + 文件夹批量压缩 + 输出目录自定义 + 输出图片格式自定义 + 输出图片质量自定义 + 排除(多个)后缀 + 排除指定目录 + 并发处理 ``` ## Tutorials 请先提前安装好GraphicsMagick并确认 ALIAS $ gm 未被git占用,程序会检查GraphicsMagick安装情况 源码Clone后执行 ``` $ npm install $ npm link ``` ``` Usage: ImageMinify -q [Quality] -e [Extension] -o [Output Path] Path... Options: -r, --removeOrigin Auto remove origin image when jobs done -s, --silence Run in background -q, --quality Output image quality.Default is 85 -e, --ext Output file extension.Support jpg,png,auto.Default is auto -E, --exceptExt Special extension will not be minified but move(copy) into output.Different ext delimit by "," -F, --exceptFolder Images in excepted folder(name) will not be minified -o, --output Output folder path.Default is current image path with a subfolder named minified -w, --worker Max minify worker at the same time.Default is max CPU Core Number -h, --help output usage information ``` ## TODO ``` - 图片缩放 - 水印添加 - 上架NPM仓库 - ... ``` ## License 本框架采用MIT协议,任何人可随意使(商)用本框架,无需通知作者本人,但请保留协议文件及文件署名