ubuntu下安装ImageMagick7

使用apt install imagemagick 安装发现是6.x版本。安装7.x版本需要参考官方文档
https://imagemagick.org/script/install-source.php#linux
卸载老版本

sudo apt autoremove imagemagick

新版本安装步骤

wget https://imagemagick.org/archive/ImageMagick.tar.gz
tar -xzvf ImageMagick.tar.gz
cd ImageMagick-7.1.1-11
./configure
make
sudo make install
sudo ldconfig /usr/local/lib

查看imagic版本magick -version

xjj@DESKTOP-65380RH:~/ImageMagick-7.1.1-11$ magick -version
Version: ImageMagick 7.1.1-11 Q16-HDRI x86_64 21206 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5)
Delegates (built-in): bzlib djvu fontconfig freetype jbig jng jp2 jpeg lcms lqr lzma openexr png tiff x xml zlib
Compiler: gcc (11.3)

生成一个logo图片再转换成jpg试试

/usr/local/bin/convert logo: logo.gif
magick logo.gif logo.jpg

结束

你可能感兴趣的:(软件工具,golang,ubuntu,linux,bash)