imagex

0.0.3 • Public • Published

gka

imagex

专注于序列帧图片优化。

使用 imagex 进行图片优化、生成图片信息数据(可用于图片还原)。

imagex

Install

$ npm i imagex

Usage

var imagex = require("imagex");
 
imagex({
    src       : "/pictures/src",  // 图片文件夹地址
    dest      : "/pictures/dest", // 输出文件夹地址
    prefix    : "prefix-",        // 重命名前缀
    isMini    : true,             // 压缩
    isCrop    : true,             // 空白裁剪
    isUnique  : true,             // 去重
    isSprites : true,             // 合图
    algorithm : "left-right",     // 合图布局模式 默认 binary-tree,可选 top-down | left-right..
    spritesCount: 2               // 生成多合图,指定几张图片合成一张合图,可选
}, function(data){
    console.log(data);            // 图片信息数据
}

Welcome

  • 欢迎 Pull requests、Issues 一般在24小时内处理
  • 讨论与咨询请+QQ 3201590286 :D

License

MIT

Copyright (c) 2017 - present, joeyguo

Package Sidebar

Install

npm i imagex

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • joeyguo