From 5a2d22cf7829d5531696a46c7d3f8590754f24a6 Mon Sep 17 00:00:00 2001 From: Bohung Date: Tue, 22 Jun 2021 17:07:29 +0800 Subject: [PATCH] Fix Imagmagick.(Add jpeg) --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a162e1c..f5064ef 100644 --- a/README.md +++ b/README.md @@ -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 才需要的步驟