图片处理利器 ImageMagic

图片处理利器 ImageMagic

ImageMagick is a suite of command-line utilities for modifying and working with images. ImageMagick can quickly perform operations on an image from a terminal, perform batch processing of many images, or be integrated into a bash script.

日常开发工作需要经常处理图片,作为一名程序员绝壁不能忍受GUI工具一个一个的处理,遂搜索一番,发现这货ImageMagic,果然是处理图片的神器.

开发中最需要的几个功能,更改图片尺寸,更改图片格式及批处理,命令行如下:

1. for file in *.png; do convert $file -resize 1920x1080 c-$file; done
2. convert terminal.gif  -resize 64x64\!  exact_terminal.gif

从此各种开发中遇到的各种妖魔鬼怪图片,统统不在话下. 最后记得去tinypig二次压缩.

资料引用

  1. 10 key ImageMagick functions

  2. useful-imagemagick-commands

  3. How to Quickly Resize, Convert & Modify Images from the Linux Terminal

标签: none

添加新评论