linux

【Linux】Linux上GraphicsMagick、ghos

2024-11-27  本文已影响0人  Bogon

GraphicsMagick 和 Ghostscript 是两款在Linux及其他操作系统上常用的开源软件,分别用于图像处理和文档/打印处理。
它们虽然功能不同,但在处理多媒体和文档相关任务时,都非常有用。

1. GraphicsMagick (gm)

GraphicsMagick 是一个高效的图像处理工具集,它广泛用于在命令行中处理各种格式的图像。
它是ImageMagick的一个分支,旨在提供更高效、更稳定的性能。
GraphicsMagick支持大量的图像格式,包括位图图像(BMP)、JPEG、PNG、TIFF、GIF、PDF等。

主要功能:

常见命令示例:

2. Ghostscript (gs)

Ghostscript 是一个解释器,专门用于处理PostScript(PS)和PDF文件。
它提供了将PostScript和PDF文件转化为其他格式、打印文件、查看文件等多种功能。

主要功能:

常见命令示例:

总结:

这两者各自专注于不同的领域,GraphicsMagick处理的是位图图像,而Ghostscript则专注于矢量图像格式和文档格式(PS/PDF)。

编译安装 ghostscript GraphicsMagick

https://github.com/ArtifexSoftware/ghostpdl-downloads/releases

http://www.graphicsmagick.org/download.html#tar-gz
https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.45/

image.png
image.png

# tar -zxf ghostscript-10.04.0.tar.gz
 
# tar -Jxf GraphicsMagick-1.3.45.tar.xz

#  yum -y install make gcc

# yum  -y  install libpng-devel   libjpeg-devel

 
# cd  ghostscript-10.04.0
# ./configure  --prefix=/usr/local/ghostscript-10.04.0
#  make && make install
# /usr/local/ghostscript-10.04.0/bin/gs  -v
GPL Ghostscript 10.04.0 (2024-09-18)
Copyright (C) 2024 Artifex Software, Inc.  All rights reserved.
 
 
 
# cd  GraphicsMagick-1.3.45
# ./configure  --prefix=/usr/local/GraphicsMagick-1.3.45
#  make && make instal
/usr/local/GraphicsMagick-1.3.45/bin/gm  -version

 

# ln -s /usr/local/ghostscript-10.04.0/bin/gs    /usr/bin/gs
 
# ln -s /usr/local/GraphicsMagick-1.3.45/bin/gm  /usr/bin/gm
image.png
上一篇 下一篇

猜你喜欢

热点阅读