GraphicsMagick

GraphicsMagick

  是从 ImageMagick 5.5.2 分支出来的

  用来读写、生成超过90种图像格式的工具集合,支持包括 TIFF, JPEG, JPEG-2000,PNG, PDF, PhotoCD, SVG, 和GIF 等图像格式

但是现在GraphicsMagick变得更稳定和优秀,GM更小更容易安装、GM更有效率、GM的手册非常丰富

GraphicsMagick的命令与ImageMagick基本是一样的

官网 http://www.graphicsmagick.org/

命令 http://www.graphicsmagick.org/utilities.html

下载,选择windows64版本

安装完成后,重启

检查是否安装成功

$ gm version
GraphicsMagick 1.3.35 2020-02-23 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2020 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.

Feature Support:
  Native Thread Safe         yes
  Large Files (> 32 bit)     yes
  Large Memory (> 32 bit)    yes
  BZIP                       yes
  DPS                        no
  FlashPix                   no
  FreeType                   yes
  Ghostscript (Library)      no
  JBIG                       yes
  JPEG-2000                  yes
  JPEG                       yes
  Little CMS                 yes
  Loadable Modules           yes
  Solaris mtmalloc           no
  Google perftools tcmalloc  no
  OpenMP                     yes (200203 "2.0")
  PNG                        yes
  TIFF                       yes
  TRIO                       no
  Solaris umem               no
  WebP                       yes
  WMF                        yes
  X11                        no
  XML                        yes
  ZLIB                       yes

Windows Build Parameters:

  MSVC Version:            1500

查看图片信息

$ gm identify 1.jpg
1.jpg JPEG 658x431+0+0 DirectClass 8-bit 37.6Ki 0.000u 0m:0.000013s

jpg转png

$ gm convert 1.jpg 1.png
$ gm identify 1.png
1.png PNG 658x431+0+0 DirectClass 8-bit 223.8Ki 0.000u 0m:0.000008s

jpg转pdf

gm convert 1.jpg 1.pdf

图片缩放

按比例

$ gm convert 1.jpg -resize 50% 2.jpg
$ gm identify 2.jpg
2.jpg JPEG 329x216+0+0 DirectClass 8-bit 7.2Ki 0.000u 0m:0.000016s

指定大小的

$ gm convert 1.jpg -resize 100x100 3.jpg
$ gm identify 3.jpg
3.jpg JPEG 100x66+0+0 DirectClass 8-bit 1.4Ki 0.000u 0m:0.000008s

 

posted @ 2020-12-17 13:23  慕尘  阅读(915)  评论(0编辑  收藏  举报