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 @   慕尘  阅读(946)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
历史上的今天:
2019-12-17 spring boot开启gzip
点击右上角即可分享
微信分享提示