
コマンドラインで画像を編集できる強力なツールであるGraphicsMagickを、Ubuntu Desktop 22.04にインストールします。
記事の目次
GraphicsMagickをaptコマンドでインストールする!
GraphicsMagickをaptコマンドでインストールします。
$ sudo apt install graphicsmagick
GraphicsMagickのバージョンを確認する!
GraphicsMagickのバージョンを確認します。
$ gm version
GraphicsMagick 1.3.38 2022-03-26 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2022 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
HEIF/HVEC ("HEIC") yes
JBIG yes
JPEG-2000 no
JPEG yes
JPEG XL no
Little CMS yes
Loadable Modules no
Solaris mtmalloc no
Google perftools tcmalloc no
OpenMP yes (201511 "4.5")
PNG yes
TIFF yes
TRIO no
Solaris umem no
WebP yes
WMF yes
X11 yes
XML yes
ZLIB yes
Host type: x86_64-pc-linux-gnu
Configured using the command:
./configure '--build' 'x86_64-linux-gnu' '--enable-shared' '--enable-static' '--enable-libtool-verbose' '--prefix=/usr' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--docdir=${prefix}/share/doc/graphicsmagick' '--with-gs-font-dir=/usr/share/fonts/type1/gsfonts' '--with-x' '--without-dps' '--without-modules' '--without-frozenpaths' '--with-webp=yes' '--with-zstd=yes' '--with-perl' '--with-perl-options=INSTALLDIRS=vendor' '--enable-quantum-library-names' '--with-quantum-depth=16' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/graphicsmagick-vK5lFw/graphicsmagick-1.4+really1.3.38=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/build/graphicsmagick-vK5lFw/graphicsmagick-1.4+really1.3.38=. -flto=auto -ffat-lto-objects -flto=a
Final Build Parameters:
CC = gcc
CFLAGS = -fopenmp -g -O2 -ffile-prefix-map=/build/graphicsmagick-vK5lFw/graphicsmagick-1.4+really1.3.38=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall
CPPFLAGS = -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -I/usr/include/libxml2
CXX = g++
CXXFLAGS = -g -O2 -ffile-prefix-map=/build/graphicsmagick-vK5lFw/graphicsmagick-1.4+really1.3.38=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security
LDFLAGS = -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now
LIBS = -ljbig -lwebp -lwebpmux -lheif -lde265 -llcms2 -ltiff -lfreetype -ljpeg -lpng16 -lwmflite -lXext -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lzstd -lm -lpthread
GraphicsMagickのコマンドのヘルプを確認する!
GraphicsMagickは、コマンドで使用するので、ヘルプを参照してみましょう。
$ gm help
GraphicsMagick 1.3.38 2022-03-26 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2022 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Usage: gm help command [options ...]
Where commands include:
animate - animate a sequence of images
batch - issue multiple commands in interactive or batch mode
benchmark - benchmark one of the other commands
compare - compare two images
composite - composite images together
conjure - execute a Magick Scripting Language (MSL) XML script
convert - convert an image or sequence of images
display - display an image on a workstation running X
help - obtain usage message for named command
identify - describe an image or image sequence
import - capture an application or X server screen
mogrify - transform an image or sequence of images
montage - create a composite image (in a grid) from separate images
time - time one of the other commands
version - obtain release version
おわりに
Ubuntu Desktop 22.04では、GraphicsMagickをaptコマンドでインストールすることができます。
参考情報
関連記事
関連書籍(Amazon)

