IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Iconmaker.js

    牧风发表于 2017-04-30 22:36:26
    love 0
    ![Iconmaker.js](https://mufeng.me/uploads/iconmaker.js.png) 经常需要把 1024px 的 logo 文件转换成 iOS 各种尺寸的,之前是用的是网上开源的一个 AppleScript 的脚本,不过有段时间没有更新了,最近一直在接触 NodeJS,用 NodeJS 写了一个转换 iOS logo 尺寸的工具。 ### 安装方法 ```shell $ npm install -g iconmaker ``` 在终端执行 `iconmaker` 之后,上下键选择尺寸,All 即包含 iPhone 和 iPad 所需尺寸。 ```shell $ LogoFolder iconmaker ? Select size (Use arrow keys) ❯ All iPhone iPad ``` 列出当前目录下所有 png 文件(包含子目录),如果没有找到文件可以选择 Not here? 然后手工输入完整路径。 ```shell ? Select image file under the folder (Use arrow keys) ❯ logo-1024.png Not here? ``` `? Set target path` 输出目录,如果不输入则在当前目录下新建一个 `IconmakerLogos` 文件夹,裁剪过的文件将会存在这里。`? Quality of the output file` 图片压缩程度,默认为 100 不压缩。 ### 更新方法 ```shell $ npm update -g iconmaker ``` 源代码托管在:[https://github.com/iMuFeng/Iconmaker.js](https://github.com/iMuFeng/Iconmaker.js)


沪ICP备19023445号-2号
友情链接