Fix Imagmagick.(Add jpeg)

This commit is contained in:
BoHung Chiu 2021-06-22 17:07:29 +08:00
parent 01f418ff7a
commit 5a2d22cf78
1 changed files with 10 additions and 2 deletions

View File

@ -86,19 +86,27 @@ $ cd libpng-1.5.13/
$ ./configure
$ make
$ sudo make install
# 編譯jpeg套件
$ sudo apt install -y libltdl-dev graphviz libpng-dev libfftw3-dev
$ sudo apt-get install -y libjpeg-turbo8-dev
$ sudo apt install -y libgif-dev libjpeg-dev libopenexr-dev libpng-dev libwebp-dev
$ sudo apt install -y cmake pkg-config libbrotli-dev
# Build imagemagick
$ wget http://www.imagemagick.org/download/ImageMagick.tar.gz
$ tar xvfz ImageMagick.tar.gz
$ cd ImageMagick-7.1.0-0/ # cd ImageMagick-x.x.x-x(版本號)
$ ./configure --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --disable-shared
$ cd ImageMagick-7.1.0-1/ # cd ImageMagick-x.x.x-x(版本號)
$ ./configure --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --disable-shared --with-modules
##在configure跑完後可確認Delegates是否有jpeg png zlib(最後一行)
$ make
$ sudo make install
$ sudo ln -s /usr/local/lib/* /usr/lib/.
$ sudo ln -s /usr/local/lib/pkgconfig/* /usr/lib/pkgconfig/.
$ sudo ln -s /usr/local/bin/* /usr/bin/.
$ convert -list configure #確認為版本7.1.0.0以上
####以下為舊的imagemagick安裝方式(請不要使用,會有圖片上傳後,解碼失敗問題)
#$ sudo apt install imagemagick
#$ convert -version # 檢查是否安裝成功,並確認版本
#$ identify -version #檢查Delegates是否有jpeg png zlib
```
## Ubuntu 20.04 才需要的步驟