slider

还是菜鸟
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

ubuntu图片处理工具之Imagemagick

Posted on 2012-06-01 10:28  slider  阅读(986)  评论(0编辑  收藏  举报

  废话就不多说了,我们用它看的就是它可以批处理吧(在ubuntu下).下面我就说说它常用的一些方法:

  1.改变图片的大小:

In the konqueror window containing the images you wish to resize, select "tools->open terminal" to bring up a shell.

In the shell type:

mogrify -resize 320x240 *.jpg

After this command is completed, all of the images will be replaced with resized version of themselves. Notice that in an effort to preserve the image aspect ratio, mogrify may not be produce images that are exactly 320x240. To force this to happen, modify the original command to by placing an exclamation point at the end of the desired resolution:

mogrify -resize 320x240! *.jpg

//在上一个同时处理格式与大小的命令吧
mogrify -format jpg -resize 1024x1024! *

//查看一个图片的信息
identiry girl.png

// rotate a image (note that it will modify the original picture)
mogrify -ratate 180 xxx.png